Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / logging / XLogFormatter.idl
blob1bc474caadb5c005ecfd33f93d358707a7229439
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef __com_sun_star_logging_XLogFormatter_idl__
21 #define __com_sun_star_logging_XLogFormatter_idl__
23 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/logging/LogRecord.idl>
27 module com { module sun { module star { module logging {
30 /** specifies the interface to be used for formatting log records
32 @see XLogHandler
34 @since OOo 2.3
36 interface XLogFormatter
38 /** returns the header string for the log
40 <p>This can be used to generate a header string, which by the XLogHandler
41 is emitted to its output channel before actually logging any concrete
42 LogRecord.</p>
44 <p>For instance, a formatter might produce table-like plain text output,
45 and could return a table-head string (potentially including line breaks)
46 here.</p>
48 string getHead();
50 /** formats the given log record for output
52 <p>A XLogHandler will call this method to format a given
53 log record. The resulting string will be emitted to the handler's output
54 channel, without processing it any further (except possibly encoding it with
55 the handler's <code>Encoding</code>).</p>
57 string format( [in] LogRecord Record );
59 /** returns the footer string for the log
61 <p>This can be used to generate a footer string, which by the XLogHandler
62 is emitted to its output channel before it is finally being closed.</p>
64 string getTail();
68 }; }; }; };
71 #endif
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */