1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef __com_sun_star_logging_FileHandler_idl__
30 #define __com_sun_star_logging_FileHandler_idl__
32 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
33 #include
<com
/sun
/star
/beans
/NamedValue.idl
>
35 //=============================================================================
37 module com
{ module sun
{ module star
{ module logging
{
39 interface XLogHandler
;
41 //=============================================================================
43 /** specifies a component implementing a log handler whose output
46 <p>The handler will use the <code>Encoding</code> attribute of <type>XLogHandler</type>
47 to determine how to encode strings before actually writing them to the output
50 @see XLogHandler::Encoding
54 service FileHandler
: XLogHandler
56 /** creates a log handler whose output is directed to a file given by URL.
59 the URL of the file to be created. This URL is resolved using the
60 <type scope="::com::sun::star::util">PathSubstitution</type> service. That
61 is, it is allowed to include placeholders such as <code>$(userurl)</code>.
63 create
( [in] string FileURL
);
65 /** creates an instance of the log handler, using generic settings
68 contains the initial settings for the log handler
70 <p>The following settings are recognized and supported:
71 <ul><li><code>Encoding</code> - denotes the initial value of the <member>XLogHandler::Encoding</member></li>
72 <li><code>Formatter</code> - denotes the initial value of the <member>XLogHandler::Formatter</member></li>
73 <li><code>Level</code> - denotes the initial value of the <member>XLogHandler::Level</member></li>
76 <p>Additionally, a setting name <code>FileURL</code> is recognized. It must be of type
77 string, and denotes the file URL to which the handler's output should be directed.</p>
79 <p>At least the URL argument must be present in the settings.</p>
81 @throws ::com::sun::star::lang::IllegalArgumentException
82 if <arg>Settings</args> contains settings whose value is of the wrong type.
84 createWithSettings
( [in] sequence
< ::com
::sun
::star
::beans
::NamedValue
> Settings
)
85 raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
);
88 //=============================================================================
92 //=============================================================================
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */