brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahgittin <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Logging brooklyn-persister thread...
Date Fri, 31 Oct 2014 02:37:15 GMT
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/283#discussion_r19648907
  
    --- 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 --
    
    set min log levels on the files here?  `jclouds-persister` could have min level `INFO`
:) and hopefully it wouldn't even get created if nothing gets written to it?  (i don't like
plethora of log files ... though i agree almost anything is better than the plethora of useless
persistence logging!)


---
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