UCommon
Namespaces | Functions
stream.h File Reference

Any ucommon streaming classes that are built from std::streamio facilities and that support ANSI C++ stream operators. More...

#include <ucommon/platform.h>
#include <ucommon/protocols.h>
#include <ucommon/thread.h>
#include <ucommon/socket.h>
#include <ucommon/fsys.h>
#include <ucommon/shell.h>
#include <iostream>
#include <fstream>
Include dependency graph for stream.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 ucommon
 Common namespace for all ucommon objects.
 

Functions

class ucommon::__attribute__ ((visibility("default"))) ExclusiveProtocol
 An exclusive locking protocol interface base. More...
 
 std::__attribute__ ((visibility("default"))) iostream &null
 Application logger is a class that implements a logger that can be used by applications to save log file somewhere on the system. More...
 
std::string & ucommon::operator+ (std::string &target, String &source)
 
std::string & ucommon::operator+= (std::string &target, String &source)
 
std::ostream & ucommon::operator<< (std::ostream &os, Socket::address &addr)
 
std::ostream & ucommon::operator<< (std::ostream &out, const PrintProtocol &format)
 
std::ostream & ucommon::operator<< (std::ostream &out, const string_t &str)
 
std::ostream & ucommon::operator<< (std::ostream &out, const stringlist_t &list)
 
std::istream & ucommon::operator>> (std::istream &in, stringlist_t &list)
 
std::istream & ucommon::operator>> (std::istream &inp, InputProtocol &format)
 
std::istream & ucommon::operator>> (std::istream &inp, string_t &str)
 

Detailed Description

Any ucommon streaming classes that are built from std::streamio facilities and that support ANSI C++ stream operators.

Definition in file stream.h.

Function Documentation

◆ __attribute__()

std::__attribute__ ( (visibility("default"))  ) &

Application logger is a class that implements a logger that can be used by applications to save log file somewhere on the system.

Manipulator for info level.

Manipulator for notice level.

Manipulator for critical level.

Manipulator for alert level.

Manipulator for emerg level.

Manipulator for error level.

Manipulator for warn level.

It uses ost::slog to write to syslog and std::clog to write to standard output.

It provides either a stream oriented logger or a old printf style one.

It can be used to log directly on a file or in a spooler like way. Latter uses a ost::ThreadQueue to implement a thread safe access to logger.

It provides a global stream variable called ost::alog.

It provides an AppLog::Ident class that represents a module name for instance that can be used to tag logs. Logging levels are the same defined into ost::Slog: Slog::levelEmergency Slog::levelAlert Slog::levelCritical Slog::levelError Slog::levelWarning Slog::levelNotice Slog::levelInfo Slog::levelDebugfrom.

Example of usage: alog << mod_name << debug << "Hello world!" << std::endl; Manipulator for debug level

Parameters
slapplication logger stream
Returns
application logger stream
Parameters
slapplication logger stream
Returns
application logger stream

Definition at line 520 of file applog.h.