Closed Bug 985857 Opened 10 years ago Closed 9 years ago

mach should default to logging to to a temp file

Categories

(Firefox Build System :: Mach Core, enhancement)

enhancement
Not set
normal

Tracking

(firefox41 fixed)

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: jesup, Assigned: glandium)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

"./mach build" should by default log to a temp file of some sort, with ability to override this and not do so.  If there's some hard reason why not, then it should be possible to set an env var or some such to set a default log file.
What are you proposing? A "last log" file that can always be consulted after the build?

Do you want this for |mach build| or every mach command?
Flags: needinfo?(rjesup)
Yes, exactly, a last-log file (or if you prefer to think of it that way, a default for -l)

And for builds and mochitests I'd guess.  I can't count the times I went "darn, that compile failed, I'll have to repeat it while capturing a log".
Flags: needinfo?(rjesup)
I think a last-$command.log would be reasonable to have.
I agree with comment #3. And that makes this a bug in the mach core as opposed to a command thing.
Component: Build Config → mach
Assignee: nobody → mh+mozilla
Blocks: 1171610
I didn't go with comment 3 because i didn't feel like figuring out the right way to hook that with mach commands so that the name is part of the file name, or the how to make the show-log command useful in that mode.

Note that ideally, we'd have an actual start timestamp in the log, which we currently don't have. We should probably store a dummy even at startup for that. We should also store more things, like the log level, probably the format string to reproduce the log (or the format string should be implied by the action name, but that needs changing all calls to log()). But let's keep all that to followup bugs.
Attachment #8615862 - Flags: review?(gps)
And don't fail to log after a clobber.
Attachment #8615862 - Attachment is obsolete: true
Attachment #8615862 - Flags: review?(gps)
Attachment #8615871 - Flags: review?(gps)
Comment on attachment 8615871 [details] [diff] [review]
Automatically log mach output and add a command to display it

Review of attachment 8615871 [details] [diff] [review]:
-----------------------------------------------------------------

This is a good start and fit to land. Please file a follow-up to implement comment #3 and have logging on every command automatically (or at least provide a decorator or something so commands can be logged automatically.
Attachment #8615871 - Flags: review?(gps) → review+
> have logging on every command automatically (or at least provide a decorator or something so commands can be logged automatically.

Not sure what you mean here, since this patch is logging every command automatically, except it doesn't do so in separate files.
Blocks: 1173232
https://hg.mozilla.org/mozilla-central/rev/632d018e4f26
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Depends on: 1279915
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: