Last modified: 2014-03-21 12:14:12 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T54236, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 52236 - rotate_logs.sh throws exceptions
rotate_logs.sh throws exceptions
Status: RESOLVED FIXED
Product: Wikimedia Labs
Classification: Unclassified
tools (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Peter Bena
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-29 18:16 UTC by Tim Landscheidt
Modified: 2014-03-21 12:14 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tim Landscheidt 2013-07-29 18:16:45 UTC
| Unhandled Exception: System.ArgumentOutOfRangeException: Cannot be negative.
| Parameter name: length
|   at System.String.Substring (Int32 startIndex, Int32 length) [0x00000] in <filename unknown>:0 
|   at filter.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
| [ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentOutOfRangeException: Cannot be negative.
| Parameter name: length
|   at System.String.Substring (Int32 startIndex, Int32 length) [0x00000] in <filename unknown>:0 
|   at filter.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 
| touch: cannot touch `/data/project/.system/logs/apache2/global_access.log': Permission denied
| /data/project/.system/logs/apache2/global_access.log: You need to share a group with the file
| chmod: changing permissions of `/data/project/.system/logs/apache2/global_access.log': Operation not permitted
Comment 1 Tim Landscheidt 2013-08-03 20:39:51 UTC
BTW, where's the source for filter.exe?
Comment 2 Tim Landscheidt 2013-08-03 20:59:01 UTC
(In reply to comment #1)
> BTW, where's the source for filter.exe?

Guess I found it (cf. https://github.com/benapetr/filter/blob/master/filter/Program.cs):

| string s;
| while ((s = Console.ReadLine()) != null)
| {
|     if (s.StartsWith("tools-webserver") && s.Contains("HTTP/"))
|     {
|         if (s.Contains("+0000]"))
|         {
|             int position = 0;
|             position = s.IndexOf("+0000]") + 8;
|             int position_of_first = s.IndexOf("/", position);
|             int position_of_next = s.IndexOf("/", position_of_first + 1);
|             s = s.Substring(0, position_of_next) + " HTTP" + s.Substring(s.LastIndexOf("/"));
|             Console.WriteLine(s);
|         }
|     }
| }

Shouldn't be too hard to port to sed :-).
Comment 3 Peter Bena 2014-03-21 12:14:12 UTC
not used on new tools

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links