]> git.saurik.com Git - apple/hfs.git/blame - livefiles_hfs_plugin/lf_hfs_logger.c
hfs-522.100.5.tar.gz
[apple/hfs.git] / livefiles_hfs_plugin / lf_hfs_logger.c
CommitLineData
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
11os_log_t gpsHFSLog;
12bool gbIsLoggerInit = false;
13
14const 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
20int
21LFHFS_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}