brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorbett <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Logging brooklyn-persister thread...
Date Fri, 28 Nov 2014 17:54:53 GMT
Github user sjcorbett commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/283#discussion_r21040683
  
    --- Diff: usage/logback-includes/src/main/resources/brooklyn/logback-appender-jclouds-split-persistence.xml
---
    @@ -0,0 +1,49 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<!--
    +    Licensed to the Apache Software Foundation (ASF) under one
    +    or more contributor license agreements.  See the NOTICE file
    +    distributed with this work for additional information
    +    regarding copyright ownership.  The ASF licenses this file
    +    to you under the Apache License, Version 2.0 (the
    +    "License"); you may not use this file except in compliance
    +    with the License.  You may obtain a copy of the License at
    +
    +     http://www.apache.org/licenses/LICENSE-2.0
    +
    +    Unless required by applicable law or agreed to in writing,
    +    software distributed under the License is distributed on an
    +    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    +    KIND, either express or implied.  See the License for the
    +    specific language governing permissions and limitations
    +    under the License.
    +-->
    +<included>
    +
    +    <!--
    +    Create one rotating log file for each discriminator given by JcloudsPersistenceThreadDiscriminator.
    +    -->
    +    <appender name="JCLOUDS-SIFT" class="ch.qos.logback.classic.sift.SiftingAppender">
    +        <discriminator class="brooklyn.logging.JcloudsPersistenceThreadDiscriminator"
/>
    +        <sift>
    +            <appender name="JCLOUDS-FILE-${jcloudsPersistSwitch}" class="ch.qos.logback.core.rolling.RollingFileAppender">
    +                <file>${logging.dir:-./}${logging.basename:-brooklyn}.${jcloudsPersistSwitch}.log</file>
    +                <append>true</append>
    +                <encoder>
    +                    <pattern>%d %-5level %logger{30} [%thread{15}]: %msg%n</pattern>
    +                </encoder>
    +
    +                <!-- Truncate log at 100 MB, max history of 10 -->
    +                <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
    +                    <fileNamePattern>${logging.dir:-./}${logging.basename:-brooklyn}.${jcloudsPersistSwitch}-%i.log.zip</fileNamePattern>
    +                    <minIndex>1</minIndex>
    +                    <maxIndex>10</maxIndex>
    +                </rollingPolicy>
    +
    +                <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
    +                    <maxFileSize>100MB</maxFileSize>
    +                </triggeringPolicy>
    +            </appender>
    +        </sift>
    +    </appender>
    +
    --- End diff --
    
    I'm not sure we can set the `persistence` log to `INFO` without doing the same to the
`jcloud` log. Maybe we could if we included the Janino library and followed these instructions:
http://logback.qos.ch/manual/configuration.html#conditional.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message