1// -*- Mode: C++ -*- 2// vim:ft=cpp 3/** 4 * \file 5 * \brief Log interface 6 */ 7/* 8 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>, 9 * Alexander Warg <warg@os.inf.tu-dresden.de> 10 * economic rights: Technische Universität Dresden (Germany) 11 * 12 * This file is part of TUD:OS and distributed under the terms of the 13 * GNU General Public License 2. 14 * Please see the COPYING-GPL-2 file for details. 15 * 16 * As a special exception, you may use this file as part of a free software 17 * library without restriction. Specifically, if other files instantiate 18 * templates or use macros or inline functions from this file, or you compile 19 * this file and link it with other files to produce an executable, this 20 * file does not by itself cause the resulting executable to be covered by 21 * the GNU General Public License. This exception does not however 22 * invalidate any other reasons why the executable file might be covered by 23 * the GNU General Public License. 24 */ 25#pragma once 26 27#include <l4/sys/vcon> 28 29namespace L4Re { 30 31/** 32 * \defgroup api_l4re_log Logging interface 33 * \ingroup api_l4re 34 * \brief Interface for log output. 35 * 36 * The logging interface provides a facility sending log output. 37 * One purpose of the interface is to serialize the output and provide 38 * the possibility to tag output sent to a specific log object. 39 */ 40/** 41 * \brief Log interface class 42 * \ingroup api_l4re_log 43 */ 44class L4_EXPORT Log : public L4::Kobject_t<Log, L4::Vcon, L4::PROTO_EMPTY> 45{ 46public: 47 48 /** 49 * \brief Print string with length len, NULL characters don't matter 50 * 51 * \param string string to print 52 * \param len length of string 53 */ 54 void printn(char const *string, int len) const noexcept; 55 56 /** 57 * \brief Print NULL-terminated string 58 * 59 * \param string string to print 60 */ 61 void print(char const *string) const noexcept; 62}; 63} 64