← Back to team overview

linuxdcpp-team team mailing list archive

[Bug 984330] [NEW] Custom filename format PM logging might cause log files not get loaded upon next startup

 

Public bug reported:

I'm using custom format logging for private chats with the following format regarding the log's filename:
%[userNI].%[hubURL].%[userCID].log

I think this more useful than the default settings, because the user can
be easily located (if he's not around all the time).

Anyways, with such filename formatting when the user gets offline before
the client will be closed, the "logpath" window parameter will contain
inaccurate filename information causing the log not be loaded next time.

Here's an example:

<Window Id="PM">
	<Param Id="Hub" Opt="1">adcs://hub.dcbase.org:16591</Param>
	<Param Id="CID" CID="1">ZPYBHDYC343RHHUVOA7NVTRMGSFNACP4GPLROKI</Param>
	<Param Id="Active" Opt="1">1</Param>
	<Param Id="LogPath" Opt="1">E:\DiReCTCoNNeCT++\Logs\eMTee2.adcs___hub_dcbase_org_16591.ZPYBHDYC343RHHUVOA7NVTRMGSFNACP4GPLROKI.log</Param>
	<Param Id="Title" Opt="1">eMTee2 - Offline</Param>
</Window>
<Window Id="PM">
	<Param Id="Hub" Opt="1">adcs://hub.dcbase.org:16591</Param>
	<Param Id="CID" CID="1">NMEW4RRISL2RUQPU3XMK5WNGJLXSPNKSVSMPEKY</Param>
	<Param Id="Active" Opt="1">1</Param>
	<Param Id="LogPath" Opt="1">E:\DiReCTCoNNeCT++\Logs\eMTee.adcs___hub_dcbase_org_16591.NMEW4RRISL2RUQPU3XMK5WNGJLXSPNKSVSMPEKY.log</Param>
	<Param Id="Title" Opt="1">eMTee - DCDev Hub</Param>
</Window>

Notice that in the first case the "Title" parameter has an "Offline"
mark instead of the hub's name, because the user was offline by the time
the client has been shut down. Also notice that in that case the
"LogPath" parameter doesn't contain the hub's address in the file name
(the custom parameter in my filename format as mentioned before), which
will cause the log not to get loaded upon next time the client is
started.

When the user gets online on the same hub later on, the logging
continues in the same file as before when the chat's being continued in
my case.

Since the hub's address is stored regardless the user being online or
not, in my opinion when the %[hubURL] parameter is used, it should be
always generated based on the content of the "Hub" parameter as in the
example listed above.

** Affects: dcplusplus
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of
Dcplusplus-team, which is subscribed to DC++.
https://bugs.launchpad.net/bugs/984330

Title:
  Custom filename format PM logging might cause log files not get loaded
  upon next startup

Status in DC++:
  New

Bug description:
  I'm using custom format logging for private chats with the following format regarding the log's filename:
  %[userNI].%[hubURL].%[userCID].log

  I think this more useful than the default settings, because the user
  can be easily located (if he's not around all the time).

  Anyways, with such filename formatting when the user gets offline
  before the client will be closed, the "logpath" window parameter will
  contain inaccurate filename information causing the log not be loaded
  next time.

  Here's an example:

  <Window Id="PM">
  	<Param Id="Hub" Opt="1">adcs://hub.dcbase.org:16591</Param>
  	<Param Id="CID" CID="1">ZPYBHDYC343RHHUVOA7NVTRMGSFNACP4GPLROKI</Param>
  	<Param Id="Active" Opt="1">1</Param>
  	<Param Id="LogPath" Opt="1">E:\DiReCTCoNNeCT++\Logs\eMTee2.adcs___hub_dcbase_org_16591.ZPYBHDYC343RHHUVOA7NVTRMGSFNACP4GPLROKI.log</Param>
  	<Param Id="Title" Opt="1">eMTee2 - Offline</Param>
  </Window>
  <Window Id="PM">
  	<Param Id="Hub" Opt="1">adcs://hub.dcbase.org:16591</Param>
  	<Param Id="CID" CID="1">NMEW4RRISL2RUQPU3XMK5WNGJLXSPNKSVSMPEKY</Param>
  	<Param Id="Active" Opt="1">1</Param>
  	<Param Id="LogPath" Opt="1">E:\DiReCTCoNNeCT++\Logs\eMTee.adcs___hub_dcbase_org_16591.NMEW4RRISL2RUQPU3XMK5WNGJLXSPNKSVSMPEKY.log</Param>
  	<Param Id="Title" Opt="1">eMTee - DCDev Hub</Param>
  </Window>

  Notice that in the first case the "Title" parameter has an "Offline"
  mark instead of the hub's name, because the user was offline by the
  time the client has been shut down. Also notice that in that case the
  "LogPath" parameter doesn't contain the hub's address in the file name
  (the custom parameter in my filename format as mentioned before),
  which will cause the log not to get loaded upon next time the client
  is started.

  When the user gets online on the same hub later on, the logging
  continues in the same file as before when the chat's being continued
  in my case.

  Since the hub's address is stored regardless the user being online or
  not, in my opinion when the %[hubURL] parameter is used, it should be
  always generated based on the content of the "Hub" parameter as in the
  example listed above.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dcplusplus/+bug/984330/+subscriptions


Follow ups

References