qpid/log/SinkOptions.h Source File

Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

qpid/log/SinkOptions.h
Go to the documentation of this file.

    00001 #ifndef QPID_LOG_SINKOPTIONS_H
    00002 #define QPID_LOG_SINKOPTIONS_H
    00003
    00004 /*
    00005  *
    00006  * Copyright (c) 2006 The Apache Software Foundation
    00007  *
    00008  * Licensed under the Apache License, Version 2.0 (the "License");
    00009  * you may not use this file except in compliance with the License.
    00010  * You may obtain a copy of the License at
    00011  *
    00012  *    http://www.apache.org/licenses/LICENSE-2.0
    00013  *
    00014  * Unless required by applicable law or agreed to in writing, software
    00015  * distributed under the License is distributed on an "AS IS" BASIS,
    00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00017  * See the License for the specific language governing permissions and
    00018  * limitations under the License.
    00019  *
    00020  */
    00021
    00022 #include "qpid/Options.h"
    00023 #include <string>
    00024
    00025 namespace qpid {
    00026 namespace log {
    00027
    00028 class Logger;
    00029
    00038 struct SinkOptions : public qpid::Options {
    00039
    00040     // Create a platform's SinkOptions. Pass argv0 as the program name,
    00041     // useful for syslog-type logging.
    00042     static SinkOptions *create(const std::string& argv0=std::string());
    00043
    00044     SinkOptions(const std::string& name="Logging sink options")
    00045         : qpid::Options(name)
    00046     {}
    00047     virtual ~SinkOptions() {}
    00048
    00049     virtual SinkOptions& operator=(const SinkOptions&) = 0;
    00050
    00051     // This allows the caller to indicate that there's no normal outputs
    00052     // available. For example, when running as a daemon. In these cases, the
    00053     // platform's "syslog"-type output should replace the default stderr
    00054     // unless some other sink has been selected.
    00055     virtual void detached(void) = 0;
    00056
    00057     // The Logger acting on these options calls setup() to request any
    00058     // Sinks be set up and fed back to the logger.
    00059     virtual void setup(Logger *logger) = 0;
    00060 };
    00061
    00062 }} // namespace qpid::log
    00063
    00064 #endif