]>
Commit | Line | Data |
---|---|---|
de8ee011 A |
1 | /* Copyright © 2017-2018 Apple Inc. All rights reserved. |
2 | * | |
3 | * lf_hfs_logger.c | |
4 | * livefiles_hfs | |
5 | * | |
6 | * Created by Yakov Ben Zaken on 31/12/2017. | |
7 | */ | |
8 | ||
9 | #include "lf_hfs_logger.h" | |
10 | ||
11 | os_log_t gpsHFSLog; | |
12 | bool gbIsLoggerInit = false; | |
13 | ||
14 | const os_log_type_t gpeHFSToOsLevel [LEVEL_AMOUNT] = { | |
15 | [ LEVEL_DEBUG ] = OS_LOG_TYPE_DEBUG, | |
16 | [ LEVEL_DEFAULT ] = OS_LOG_TYPE_DEFAULT, | |
17 | [ LEVEL_ERROR ] = OS_LOG_TYPE_ERROR | |
18 | }; | |
19 | ||
20 | int | |
21 | LFHFS_LoggerInit( void ) | |
22 | { | |
23 | int iErr = 0; | |
24 | if ( (gpsHFSLog = os_log_create("com.apple.filesystems.livefiles_hfs_plugin", "plugin")) == NULL) { | |
25 | iErr = 1; | |
26 | } | |
27 | else | |
28 | { | |
29 | gbIsLoggerInit = true; | |
30 | } | |
31 | ||
32 | return iErr; | |
33 | } |