2016-09-12 01:21:14 +01:00
|
|
|
//
|
|
|
|
// Logging.h
|
2017-04-13 10:29:18 +01:00
|
|
|
// OverSight
|
2016-09-12 01:21:14 +01:00
|
|
|
//
|
|
|
|
// Created by Patrick Wardle on 7/7/16.
|
|
|
|
// Copyright (c) 2016 Objective-See. All rights reserved.
|
|
|
|
//
|
|
|
|
#import <syslog.h>
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
|
|
|
//log a msg to syslog
|
|
|
|
// ->also disk, if error
|
|
|
|
void logMsg(int level, NSString* msg);
|
|
|
|
|
2017-04-13 10:29:18 +01:00
|
|
|
//prep/open log file
|
2017-09-25 07:45:02 +01:00
|
|
|
BOOL initLogging(void);
|
2017-04-13 10:29:18 +01:00
|
|
|
|
|
|
|
//get path to log file
|
2017-09-25 07:45:02 +01:00
|
|
|
NSString* logFilePath(void);
|
2017-04-13 10:29:18 +01:00
|
|
|
|
|
|
|
//de-init logging
|
2017-09-25 07:45:02 +01:00
|
|
|
void deinitLogging(void);
|
2017-04-13 10:29:18 +01:00
|
|
|
|
|
|
|
//log to file
|
|
|
|
void log2File(NSString* msg);
|