Picture of iqbal
Registered 5 years 81 days
iqbal Tuesday, 6 December 2022, 10:55 AM
Log files of two app instances of same app are showing same data
Hi
wenn I install two App instances of same app on same App Manager. then log file of one App Instance shows Logs from other instance. why this happens and how can i prevent this.

BR
Iqbal

Picture of Daniel Deterding (innovaphone)
Moderator Registered 14 years 345 days
Daniel Deterding (innovaphone) Tuesday, 6 December 2022, 11:06 AM
Re: Log files of two app instances of same app are showing same data
Hi Iqbal,

This is by design.

One App Service has only a single log file and all App Instances write into the same log file, as every instance still runs inside the same process.

Every log written by using AppInstance::Log is prefixed with name@domain of the instance which called the Log function.
If you just use debug->printf, you won't be able to distinct logs of different instances and these logs will be always written independent of configured trace flags on an instance, so the usage of debug->printf is discouraged for production usage.

The trace flags configuration is done per instance, so you can e.g. enable database traces just on instance1 so you'll just see database logs of instance1 and not of other instances.

Greetings,
Daniel
Picture of iqbal
Registered 5 years 81 days
iqbal Thursday, 8 December 2022, 09:22 AM
Re: Log files of two app instances of same app are showing same data
Hi Daniel
I understand the behavior that you described. but we have tow separate installations of same app with different versions. these Apps have their own instances.
BR
Iqbal
Picture of Daniel Deterding (innovaphone)
Moderator Registered 14 years 345 days
Daniel Deterding (innovaphone) Thursday, 8 December 2022, 09:32 AM
Re: Log files of two app instances of same app are showing same data
The same app on the same App Platform?
In this case, the app must have a different app service id and thus it has a different log file than the other.

Greetings,
Daniel
Picture of iqbal
Registered 5 years 81 days
iqbal Thursday, 8 December 2022, 09:36 AM
Re: Log files of two app instances of same app are showing same data
Hi Daniel
yes same app has two installations on same App Manager with different version and service ids are also different. but logs are same.
Regards
Iqbal
Picture of Daniel Deterding (innovaphone)
Moderator Registered 14 years 345 days
Daniel Deterding (innovaphone) Thursday, 8 December 2022, 09:43 AM
Re: Log files of two app instances of same app are showing same data
Ah, ok ...
You didn't rename the binary or not?

This issues has been already addressed in 13r3. In 13r2 you must rename the app binary to match the service id. In 13r3 the AP Manager automatically internally renames the binary.

Then you will have different logfiles.

Greetings,
Daniel
Picture of iqbal
Registered 5 years 81 days
iqbal Thursday, 8 December 2022, 09:51 AM
Re: Log files of two app instances of same app are showing same data
Hi Daniel
yes binary has same name for both installations.
ok we try this.
Regards
Iqbal
← You can define your color theme preference here