2 * (c) 2008-2009 Alexander Warg <warg@os.inf.tu-dresden.de>
3 * economic rights: Technische Universität Dresden (Germany)
5 * This file is part of TUD:OS and distributed under the terms of the
6 * GNU General Public License 2.
7 * Please see the COPYING-GPL-2 file for details.
11 #include <l4/sys/capability>
12 #include <l4/cxx/ipc_server>
13 #include <l4/cxx/string>
15 #include "local_service.h"
20 class Log : public L4::Server_object
30 Log() : _l(0), _color(0), _in_line(false) {}
31 void set_tag(cxx::String const &tag)
33 _l = cxx::min<unsigned long>(tag.len(), Max_tag);
34 memcpy(_tag, tag.start(), _l);
37 void set_color(unsigned char color)
40 char const *tag() const { return _tag; }
41 unsigned char color() const { return _color; }
43 int dispatch(l4_umword_t obj, L4::Ipc_iostream &ios);
45 static int color_value(cxx::String const &col);