Changeset 611236e for perl/lib/BarnOwl/Message.pm
- Timestamp:
- Jan 7, 2014, 6:02:25 PM (9 years ago)
- Children:
- 2688bd5
- Parents:
- cc27237
- git-author:
- Jason Gross <jgross@mit.edu> (01/05/14 18:08:28)
- git-committer:
- Jason Gross <jgross@mit.edu> (01/07/14 18:02:25)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/lib/BarnOwl/Message.pm
r50a3240 r611236e 183 183 } 184 184 $filename = "unknown" if !defined($filename) || $filename eq ''; 185 return ($filename); 185 if (BarnOwl::getvar('log-to-subdirectories') eq 'on') { 186 return ($filename); 187 } else { 188 return ($m->log_subfolder . ':' . $filename); 189 } 186 190 } 187 191 … … 205 209 Returns the folder in which all messages of this class get logged. 206 210 207 Defaults to C<log_base_path>/C<log_subfolder>. 211 Defaults to C<log_base_path/log_subfolder> if C<log-to-subdirectories> 212 is enabled, or to the C<logpath> BarnOwl variable if it is not. 213 214 Most protocols should override C<log_subfolder> rather than 215 C<log_path>, in order to properly take into account the value of 216 C<log-to-subdirectories>. 208 217 209 218 =cut … … 211 220 sub log_path { 212 221 my ($m) = @_; 213 return File::Spec->catfile($m->log_base_path, $m->log_subfolder); 222 if (BarnOwl::getvar('log-to-subdirectories') eq 'on') { 223 return File::Spec->catfile($m->log_base_path, $m->log_subfolder); 224 } else { 225 return BarnOwl::getvar('logpath'); 226 } 214 227 } 215 228
Note: See TracChangeset
for help on using the changeset viewer.