After pointing log file to a different location, container while starting, initially writes logs to default location ${karaf.home}/data/log

Solution Verified - Updated -

Issue

  • We need to configure logging path different than {karaf.home}/data/log/fuse.log
  • We update default karaf profile to set new value for org.ops4j.pax.logging/log4j.appender.out.file.
  • Please take a look on our 3 steps
  • Step 1. create version
  • We update default karaf profile :
    • actual version is 1.1
fabric:version-create --description "logging setup"
Created version: 1.2 as copy of: 1.1
  • Step 2. update profile
profile-edit --pid org.ops4j.pax.logging/log4j.appender.out.file=/app/logs/fuse/fuse.log karaf 1.2
  • Step 3. container upgrade
container-upgrade 1.2 fabric-server-02
container-upgrade 1.2 fabric-server-03
container-upgrade 1.2 fabric-server-04
  • Our fabric:container-list have new version 1.2
[id]               [version]  [type]  [connected]  [profiles]              [provision status]
fabric-server-02*  1.2        karaf   yes          fabric                  success
                                                   fabric-ensemble-0002-1
fabric-server-03   1.2        karaf   yes          fabric                  success
                                                   fabric-ensemble-0002-2
fabric-server-04   1.2        karaf   yes          fabric                  success
                                                   fabric-ensemble-0002-3
  • To reproduce our case, you should stop container and clear {karaf.home}/data/log folder on VM.
  • When you start fabric container (this one with new profile) firstly fabric create fuse.log inside default {karaf.home}/data/log then inside /app/logs/fuse/fuse.log
  • After all we have two log files :
    a) log4j.appender.out.file /app/logs/fuse/fuse.log
    b) default fuse.log inside {karaf.home}/data/log/fuse.log

  • This is realy big problem for us and I would like to ask you for help. Why this situation appears and this profile is ignored on the beginning ?

Environment

  • Red Hat JBoss Fuse
    • 6.3.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content