~henrix/ubuntu/precise/open-vm-dkms/lp-1416003

« back to all changes in this revision

Viewing changes to lib/include/log.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-10-23 15:32:00 UTC
  • mfrom: (1.1.2 upstream) (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20081023153200-gc1bfx89hj35c799
Tags: 2008.10.10-123053-2
* Correcting typo in dh_installinit call.
* Downgrading depends on module-assistant to recommends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 *
17
17
 *********************************************************/
18
18
 
19
 
#ifndef _LOG_H_
20
 
#define _LOG_H_
 
19
#ifndef VMWARE_LOG_H
 
20
#define VMWARE_LOG_H
21
21
 
22
22
#define INCLUDE_ALLOW_USERLEVEL
23
23
#define INCLUDE_ALLOW_VMCORE
31
31
 
32
32
struct LogState;
33
33
 
 
34
typedef struct
 
35
{
 
36
   const char *fileName;             // File name, if known
 
37
   const char *config;               // Config variable to look up
 
38
   const char *suffix;               // Suffix to generate log file name
 
39
   const char *appName;              // App name for log header
 
40
   const char *appVersion;           // App version for log header
 
41
   Bool logging;                     // Logging is enabled or not
 
42
   Bool append;                      // Append to log file
 
43
   unsigned int keepOld;             // Number of old logs to keep
 
44
   unsigned int throttleThreshold;   // Threshold for throttling
 
45
   unsigned int throttleBytesPerSec; // BPS for throttle
 
46
   Bool switchFile;                  // Switch the initial log file
 
47
   unsigned int rotateSize;          // Size at which log should be rotated
 
48
} LogInitParams;
 
49
 
 
50
EXTERN void Log_GetInitDefaults(const char *fileName, const char *config,
 
51
                                const char *suffix, LogInitParams *params);
 
52
 
34
53
EXTERN Bool Log_Init(const char *fileName, const char *config, const char *suffix);
35
54
EXTERN Bool Log_InitForApp(const char *fileName, const char *config,
36
55
                           const char *suffix, const char *appName,
37
56
                           const char *appVersion);
38
 
EXTERN Bool Log_InitEx(const char *fileName, const char *config, const char *suffix,
39
 
                       const char *appName, const char *appVersion,
40
 
                       Bool logging, Bool append,
41
 
                       unsigned int keepOld, unsigned int throttleThreshold, 
42
 
                       unsigned int throttleBytesPerSec, Bool switchFile, 
43
 
                       unsigned int rotateSize);
 
57
EXTERN Bool Log_InitEx(const LogInitParams *params);
44
58
EXTERN void Log_Exit(void);
45
59
EXTERN void Log_SetConfigDir(const char *configDir);
46
60
EXTERN void Log_SetLockFunc(void (*f)(Bool locking));
111
125
EXTERN void Log_Histogram(uint32 n, uint32 histo[], int nbuckets,
112
126
                          const char *message, int *count, int limit);
113
127
 
114
 
#endif
 
128
#endif /* VMWARE_LOG_H */