Note that on a Mac TMPDIR is /var/folder/gobbledegook/ and that's what
os.TempDir uses, falling back to "/tmp" if it is unset.
On a Mac, /tmp is a symlink to /private/tmp. You can think of this as public
and private temporary directories.
As for your original problem, showing code would be the easiest way for people
to help debug your specific problem. My shot in the dark suggestion would be
to make sure you're calling Flush(). I usually have a line like this at the
top of my main:
defer glog.Flush()
For short lived programs, or programs with little logging output, the data may
not make it to disk before exiting. That race to write out the data might be
why you see the logs sometimes, but not others.
Bill
On 04/29, Jean de Klerk wrote:
> Thanks for the very well explain reply, much appreciated. As far as I can
> tell, Darwin's tempdir is also /tmp
> (
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/mktemp.1.html).
> So this is odd. I will try this same process on another mac and see if I
> can replicate problems.
>
> In the meantime, you have clarified that the weirdness I'm running into is
> system-side and not golang. Thanks for the info!
> Jean
>
> On Tuesday, April 29, 2014 4:18:09 AM UTC-4, Jan Mercl wrote:
> >
> > On Tue, Apr 29, 2014 at 3:16 AM, Jean de Klerk <
jade...@gmail.com<javascript:>>
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
golang-nuts...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.