MOS Source Code
Loading...
Searching...
No Matches
syslog.hpp File Reference
#include "mos/syslog/debug.hpp"
#include "mos/syslog/formatter.hpp"
#include <array>
#include <mos/refcount.hpp>
#include <mos/string_view.hpp>
#include <mos/type_utils.hpp>
#include <type_traits>
Include dependency graph for syslog.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Preformatted< M, Args >
struct  SyslogStreamWriter
struct  LoggingDescriptor< feature, level >

Namespaces

namespace  mos

Macros

#define DefineLogStream(name, level)
#define f(_fmt)
#define fmt(_fmt, ...)

Typedefs

using SyslogBuffer = std::array<char, MOS_PRINTK_BUFFER_SIZE>

Enumerations

enum class  LogLevel {
  FATAL = 6 , EMERG = 5 , WARN = 4 , EMPH = 3 ,
  INFO = 2 , INFO2 = 1 , UNSET = 0
}

Functions

int snprintf (char *__restrict str, size_t size, const char *__restrict format,...)
void lprintk (LogLevel loglevel, const char *format,...)
long do_syslog (LogLevel level, const char *file, const char *func, int line, const debug_info_entry *feat, const char *fmt,...)

Variables

struct Consoleprintk_console
constexpr auto mInfo2 = mos::LoggingDescriptor<_none, LogLevel::INFO2>()
template<DebugFeature feat>
constexpr auto dInfo2 = mos::LoggingDescriptor<feat, LogLevel::INFO2>()
constexpr auto mInfo = mos::LoggingDescriptor<_none, LogLevel::INFO>()
template<DebugFeature feat>
constexpr auto dInfo = mos::LoggingDescriptor<feat, LogLevel::INFO>()
constexpr auto mEmph = mos::LoggingDescriptor<_none, LogLevel::EMPH>()
template<DebugFeature feat>
constexpr auto dEmph = mos::LoggingDescriptor<feat, LogLevel::EMPH>()
constexpr auto mWarn = mos::LoggingDescriptor<_none, LogLevel::WARN>()
template<DebugFeature feat>
constexpr auto dWarn = mos::LoggingDescriptor<feat, LogLevel::WARN>()
constexpr auto mEmerg = mos::LoggingDescriptor<_none, LogLevel::EMERG>()
template<DebugFeature feat>
constexpr auto dEmerg = mos::LoggingDescriptor<feat, LogLevel::EMERG>()
constexpr auto mFatal = mos::LoggingDescriptor<_none, LogLevel::FATAL>()
template<DebugFeature feat>
constexpr auto dFatal = mos::LoggingDescriptor<feat, LogLevel::FATAL>()
constexpr auto mCont = mos::LoggingDescriptor<_none, LogLevel::UNSET>()
template<DebugFeature feat>
constexpr auto dCont = mos::LoggingDescriptor<feat, LogLevel::UNSET>()

Macro Definition Documentation

◆ DefineLogStream

#define DefineLogStream ( name,
level )
Value:
constexpr auto inline m##name = mos::LoggingDescriptor<_none, LogLevel::level>(); \
template<DebugFeature feat> \
const char * name
Definition slab.cpp:33

Definition at line 146 of file syslog.hpp.

◆ f

◆ fmt

Enumeration Type Documentation

◆ LogLevel

enum class LogLevel
strong
Enumerator
FATAL 
EMERG 
WARN 
EMPH 
INFO 
INFO2 
UNSET 

Definition at line 14 of file syslog.hpp.

Function Documentation

◆ snprintf()

◆ lprintk()

void lprintk ( LogLevel loglevel,
const char * format,
... )

Definition at line 104 of file printk.cpp.

◆ do_syslog()

long do_syslog ( LogLevel level,
const char * file,
const char * func,
int line,
const debug_info_entry * feat,
const char * fmt,
... )

Definition at line 55 of file syslog.cpp.

Here is the call graph for this function:

Variable Documentation

◆ printk_console

struct Console* printk_console
extern

◆ mInfo2

auto mInfo2 = mos::LoggingDescriptor<_none, LogLevel::INFO2>()
inlineconstexpr

Definition at line 151 of file syslog.hpp.

◆ dInfo2

◆ mInfo

◆ dInfo

template<DebugFeature feat>
auto dInfo = mos::LoggingDescriptor<feat, LogLevel::INFO>()
inlineconstexpr

Definition at line 152 of file syslog.hpp.

Referenced by ipc_connect_to_server(), ipc_server_accept(), and ipc_server_create().

◆ mEmph

auto mEmph = mos::LoggingDescriptor<_none, LogLevel::EMPH>()
inlineconstexpr

Definition at line 153 of file syslog.hpp.

◆ dEmph

template<DebugFeature feat>
auto dEmph = mos::LoggingDescriptor<feat, LogLevel::EMPH>()
inlineconstexpr

Definition at line 153 of file syslog.hpp.

Referenced by mm_handle_fault(), Process::Process(), and process_do_fork().

◆ mWarn

◆ dWarn

◆ mEmerg

◆ dEmerg

template<DebugFeature feat>
auto dEmerg = mos::LoggingDescriptor<feat, LogLevel::EMERG>()
inlineconstexpr

Definition at line 155 of file syslog.hpp.

◆ mFatal

auto mFatal = mos::LoggingDescriptor<_none, LogLevel::FATAL>()
inlineconstexpr

Definition at line 156 of file syslog.hpp.

◆ dFatal

template<DebugFeature feat>
auto dFatal = mos::LoggingDescriptor<feat, LogLevel::FATAL>()
inlineconstexpr

Definition at line 156 of file syslog.hpp.

◆ mCont

auto mCont = mos::LoggingDescriptor<_none, LogLevel::UNSET>()
inlineconstexpr

Definition at line 157 of file syslog.hpp.

Referenced by invalid_page_fault().

◆ dCont

template<DebugFeature feat>
auto dCont = mos::LoggingDescriptor<feat, LogLevel::UNSET>()
inlineconstexpr

Definition at line 157 of file syslog.hpp.

Referenced by kmemcache_alloc(), and mm_handle_fault().