CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
logging_internal.h File Reference
#include <cstdarg>
#include <string>
Include dependency graph for logging_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DefaultLogging
 

Macros

#define SetLogDebugFile(filename)   ((void)0)
 
#define GetLogDebugFile()   (std::string(""))
 

Enumerations

enum  LogFacilities {
  kLogDebug = 0x01, kLogStdout = 0x02, kLogStderr = 0x04, kLogSyslog = 0x08,
  kLogSyslogWarn = 0x10, kLogSyslogErr = 0x20, kLogCustom0 = 0x40, kLogCustom1 = 0x80,
  kLogCustom2 = 0x100
}
 
enum  LogFlags { kLogNoLinebreak = 0x200, kLogShowSource = 0x400 }
 
enum  LogLevels {
  kLogLevel0 = 0x800, kLogVerbose = 0x1000, kLogNormal = 0x2000, kLogDiscrete = 0x4000,
  kLogNone = 0x8000
}
 
enum  LogSource {
  kLogCache = 1, kLogCatalog, kLogSql, kLogCvmfs,
  kLogHash, kLogDownload, kLogCompress, kLogQuota,
  kLogTalk, kLogMonitor, kLogLru, kLogFuse,
  kLogSignature, kLogFsTraversal, kLogCatalogTraversal, kLogNfsMaps,
  kLogPublish, kLogSpooler, kLogConcurrency, kLogUtility,
  kLogGlueBuffer, kLogHistory, kLogUnionFs, kLogPathspec,
  kLogReceiver, kLogUploadS3, kLogUploadGateway, kLogS3Fanout,
  kLogGc, kLogDns, kLogAuthz, kLogReflog,
  kLogKvStore
}
 

Functions

void SetLogSyslogLevel (const int level)
 
int GetLogSyslogLevel ()
 
void SetLogSyslogFacility (const int facility)
 
int GetLogSyslogFacility ()
 
void SetLogCustomFile (unsigned id, const std::string &filename)
 
void SetLogMicroSyslog (const std::string &filename)
 
std::string GetLogMicroSyslog ()
 
void SetLogSyslogPrefix (const std::string &prefix)
 
void SetLogSyslogShowPID (bool flag)
 
void SetLogVerbosity (const LogLevels min_level)
 
void LogShutdown ()
 
void SetAltLogFunc (void(*fn)(const LogSource source, const int mask, const char *msg))
 

Variables

const int kLogVerboseMsg = kLogStdout | kLogShowSource | kLogVerbose
 
const int kLogWarning = kLogStdout | kLogShowSource | kLogNormal
 

Macro Definition Documentation

#define GetLogDebugFile ( )    (std::string(""))
#define SetLogDebugFile (   filename)    ((void)0)

Enumeration Type Documentation

This file is part of the CernVM File System.

Enumerator
kLogDebug 
kLogStdout 
kLogStderr 
kLogSyslog 
kLogSyslogWarn 
kLogSyslogErr 
kLogCustom0 
kLogCustom1 
kLogCustom2 

Definition at line 17 of file logging_internal.h.

enum LogFlags
Enumerator
kLogNoLinebreak 
kLogShowSource 

Definition at line 54 of file logging_internal.h.

enum LogLevels
Enumerator
kLogLevel0 
kLogVerbose 
kLogNormal 
kLogDiscrete 
kLogNone 

Definition at line 59 of file logging_internal.h.

enum LogSource

Changes in this enum must be done in logging.cc as well! (see const char *module_names[] = {....})

Enumerator
kLogCache 
kLogCatalog 
kLogSql 
kLogCvmfs 
kLogHash 
kLogDownload 
kLogCompress 
kLogQuota 
kLogTalk 
kLogMonitor 
kLogLru 
kLogFuse 
kLogSignature 
kLogFsTraversal 
kLogCatalogTraversal 
kLogNfsMaps 
kLogPublish 
kLogSpooler 
kLogConcurrency 
kLogUtility 
kLogGlueBuffer 
kLogHistory 
kLogUnionFs 
kLogPathspec 
kLogReceiver 
kLogUploadS3 
kLogUploadGateway 
kLogS3Fanout 
kLogGc 
kLogDns 
kLogAuthz 
kLogReflog 
kLogKvStore 

Definition at line 71 of file logging_internal.h.

Function Documentation

std::string GetLogMicroSyslog ( )

Definition at line 250 of file logging.cc.

Referenced by PosixQuotaManager::CreateShared(), Watchdog::ReportStacktrace(), and Watchdog::Supervise().

Here is the caller graph for this function:

int GetLogSyslogFacility ( )

Definition at line 160 of file logging.cc.

Referenced by PosixQuotaManager::CreateShared(), AuthzExternalFetcher::Handshake(), and SetLogSyslogShowPID().

Here is the caller graph for this function:

int GetLogSyslogLevel ( )

Definition at line 114 of file logging.cc.

Referenced by PosixQuotaManager::CreateShared(), and AuthzExternalFetcher::Handshake().

Here is the caller graph for this function:

void LogShutdown ( )

Definition at line 528 of file logging.cc.

Here is the call graph for this function:

void SetAltLogFunc ( void(*)(const LogSource source, const int mask, const char *msg)  fn)

Changes the debug log file from stderr. No effect if DEBUGMSG is undefined.

Definition at line 350 of file logging.cc.

Referenced by cvmfs_set_log_fn(), and download::MainResolveProxyDescription().

Here is the caller graph for this function:

void SetLogCustomFile ( unsigned  id,
const std::string &  filename 
)

Opens a custom log file

Definition at line 477 of file logging.cc.

Referenced by LogShutdown().

Here is the call graph for this function:

Here is the caller graph for this function:

void SetLogMicroSyslog ( const std::string &  filename)

"Micro-Syslog" write kLogSyslog messages into filename. It rotates this file. Requires for µCernVM

Definition at line 214 of file logging.cc.

Referenced by FuseMain(), LogShutdown(), PosixQuotaManager::MainCacheManager(), loader::loader_talk::MainTalk(), Watchdog::ReportStacktrace(), FileSystem::SetupLogging(), Watchdog::Supervise(), FileSystem::TearDown2ReadOnly(), and FileSystem::~FileSystem().

Here is the call graph for this function:

Here is the caller graph for this function:

void SetLogSyslogFacility ( const int  local_facility)

Sets the syslog facility to one of local0 .. local7. Falls back to LOG_USER if local_facility is not in [0..7]

Definition at line 129 of file logging.cc.

Referenced by FuseMain(), main(), PosixQuotaManager::MainCacheManager(), and FileSystem::SetupLogging().

Here is the caller graph for this function:

void SetLogSyslogLevel ( const int  level)

Sets the level that is used for all messages to the syslog facility.

Definition at line 97 of file logging.cc.

Referenced by FuseMain(), PosixQuotaManager::MainCacheManager(), and FileSystem::SetupLogging().

Here is the caller graph for this function:

void SetLogSyslogPrefix ( const std::string &  prefix)

The syslog prefix is used to distinguish multiple repositories in /var/log/messages

Definition at line 187 of file logging.cc.

Referenced by FuseMain(), FileSystem::SetupLogging(), and FileSystem::~FileSystem().

Here is the caller graph for this function:

void SetLogSyslogShowPID ( bool  flag)

Definition at line 200 of file logging.cc.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void SetLogVerbosity ( const LogLevels  min_level)

Set the minimum verbosity level. By default kLogNormal.

Definition at line 207 of file logging.cc.

Referenced by swissknife::CommandInfo::Main(), swissknife::CommandCheck::Main(), swissknife::CommandPull::Main(), swissknife::CommandCreate::Main(), and swissknife::CommandSync::Main().

Here is the caller graph for this function:

Variable Documentation

const int kLogVerboseMsg = kLogStdout | kLogShowSource | kLogVerbose

Definition at line 107 of file logging_internal.h.

Referenced by catalog::WritableCatalogManager::AddDirectory(), catalog::WritableCatalog::AddFileChunk(), catalog::WritableCatalogManager::AddHardlinkGroup(), catalog::WritableCatalogManager::Balance(), catalog::WritableCatalogManager::CatalogUploadCallback(), swissknife::CommandTag::CloseAndPublishHistory(), catalog::WritableCatalog::Commit(), catalog::WritableCatalogManager::Commit(), publish::SyncMediator::Commit(), publish::SyncMediator::CompleteHardlinks(), FileSystemTraversal< T >::DoRecursion(), upload::LocalUploader::DoUpload(), catalog::WritableCatalogManager::FinalizeCatalog(), upload::LocalUploader::FinalizeStreamedUpload(), swissknife::CommandCheck::Find(), swissknife::CommandEditTag::GetTagRootHash(), ConcurrentWorkers< WorkerT >::Initialize(), publish::SyncMediator::InsertHardlink(), publish::SyncMediator::InsertLegacyHardlink(), swissknife::CommandPull::Main(), swissknife::CommandApplyDirtab::Main(), swissknife::MainWorker(), MemoryMappedFile::Map(), upload::LocalUploader::Move(), TaskRegister::Process(), publish::SyncUnion::ProcessFile(), publish::SyncMediator::PublishFilesCallback(), publish::SyncMediator::PublishHardlinksCallback(), catalog::WritableCatalogManager::RemoveDirectory(), publish::SyncMediator::RemoveFile(), SigningTool::Run(), ConcurrentWorkers< WorkerT >::RunCallbackThreadWrapper(), ConcurrentWorkers< WorkerT >::RunWorker(), catalog::WritableCatalogManager::SnapshotCatalogs(), catalog::WritableCatalogManager::SnapshotCatalogsSerialized(), upload::LocalUploader::StreamedUpload(), ConcurrentWorkers< WorkerT >::Terminate(), catalog::WritableCatalogManager::TouchDirectory(), catalog::WritableCatalog::Transaction(), publish::SyncUnionAufs::Traverse(), publish::SyncUnionOverlayfs::Traverse(), MemoryMappedFile::Unmap(), swissknife::CommandTag::UpdateUndoTags(), swissknife::CommandTag::UploadCatalogAndUpdateManifest(), and ConcurrentWorkers< WorkerT >::WaitForEmptyQueue().