Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra inclusion of __FUNCTION__ and __LINE__, since they are already included in DEBUG() output by default. #143

Closed
wants to merge 1 commit into from

Conversation

jelmer
Copy link
Member

@jelmer jelmer commented Nov 23, 2014

already included in DEBUG() output by default.

already included in DEBUG() output by default.
@jelmer jelmer changed the title bgegbuflfirgddcRemove extra inclusion of __FUNCTION__ and __LINE__, since they are bgegbuflfirgddcRemove extra inclusion of __FUNCTION__ and __LINE__, since they are already included in DEBUG() output by default. Nov 23, 2014
@jelmer jelmer changed the title bgegbuflfirgddcRemove extra inclusion of __FUNCTION__ and __LINE__, since they are already included in DEBUG() output by default. Remove extra inclusion of __FUNCTION__ and __LINE__, since they are already included in DEBUG() output by default. Nov 23, 2014
@blaxter
Copy link
Member

blaxter commented Dec 1, 2014

There are lot of DEBUG() messages with __FUNCTION__ and __LINE__ despite that in default samba.log __LOCATION__ is added to every line.

Actually some of those DEBUG() are mine 😳, mostly because I normally execute samba with -i, in that mode DEBUG() messages don't have the same format than in samba (the timestamp line doesn't show up). Do you know why is there such difference behaviour?

I have to figure this out and then I'll be more than happy to unify DEBUG macros and remove all those __FOO__ stuff ✌️

@jelmer
Copy link
Member Author

jelmer commented Dec 1, 2014

Ah, that makes sense. I was wondering why those macros had been added in the first place. :-)

I'll see if I can add a flag to Samba to include the location by default when writing logs to standard out in interactive mode.

@kamenim
Copy link
Contributor

kamenim commented Dec 1, 2014

As far as I recall, Samba prints timestamp only when using syslog

On Mon, Dec 1, 2014 at 8:47 PM, Jelmer Vernooij notifications@github.com
wrote:

Ah, that makes sense. I was wondering why those macros had been added in
the first place. :-)

I'll see if I can add a flag to Samba to include the location by default
when writing logs to standard out in interactive mode.


Reply to this email directly or view it on GitHub
#143 (comment).

@jelmer
Copy link
Member Author

jelmer commented Dec 1, 2014

@kamenim also when it directly writes to logfiles, but not when it writes to standard out.

@blaxter
Copy link
Member

blaxter commented Dec 2, 2014

https://git.samba.org/?p=samba.git;a=blob;f=lib/util/debug.c;h=750ad2597593714dacead736558ee9e4903bb91c;hb=HEAD#l972

972         /* Don't print a header if we're logging to stdout. */
973         if ( state.logtype != DEBUG_FILE ) {
974                 return( true );
975         }
976 

@jelmer
Copy link
Member Author

jelmer commented Dec 2, 2014

On Tue, Dec 02, 2014 at 02:12:42AM -0800, Jesús García Sáez wrote:

https://git.samba.org/?p=samba.git;a=blob;f=lib/util/debug.c;h=750ad2597593714dacead736558ee9e4903bb91c;hb=HEAD#l972

972         /* Don't print a header if we're logging to stdout. */
973         if ( state.logtype != DEBUG_FILE ) {
974                 return( true );
975         }
976 

Yeah. I'd like to change that to still not output the full header
(as that is kindof spammy), but perhaps prefix it with the location
information.

Cheers,

jelmer

Jelmer Vernooij jelmer@openchange.org - https://jelmer.uk/

@jkerihuel
Copy link
Member

What is the status of this pull request now that we have OC_DEBUG implemented?

@jelmer
Copy link
Member Author

jelmer commented Mar 24, 2015

Once we migrate all instances of DEBUG over, this pull request will be obsolete.

On 24 March 2015 9:56:27 am GMT+00:00, Julien Kerihuel notifications@github.com wrote:

What is the status of this pull request now that we have OC_DEBUG
implemented?


Reply to this email directly or view it on GitHub:
#143 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@blaxter
Copy link
Member

blaxter commented Mar 24, 2015

so let's close this

@blaxter blaxter closed this Mar 24, 2015
javierag pushed a commit to javierag/openchange that referenced this pull request Sep 17, 2015
@jelmer jelmer deleted the remove-file-link branch September 20, 2015 18:26
@jelmer jelmer restored the remove-file-link branch September 20, 2015 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants