User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 7 of 10

Thread: Explaining TrinityCore's Logging define directives

  1. #1
    Founder <span style='color: #FF4500'>Tommy</span>'s Avatar
    Join Date
    Apr 2013
    Posts
    7,391
    XP
    3,449,104
    Level
    378
    Thanks
    889
    Thanked 1,855 Times in 1,119 Posts

    Explaining TrinityCore's Logging define directives

    Hello, this is just going to be a simple tutorial explaining how to use the define directives on TrinityCore's logging system.
    Things you should know:

    • This is case sensitive (caps only)


    The logging define directives are:


    • TC_LOG_TRACE
    • TC_LOG_DEBUG
    • TC_LOG_INFO
    • TC_LOG_WARN
    • TC_LOG_ERROR
    • TC_LOG_FATAL


    The arguments are the same as using "sLog->". Example:

    Code:
    TC_LOG_WHATEVER(filterType, "Msg", ..);
    String FilterTypes
    • Replace LOG_FILTER_NETWORKIO with "network" (with quotations)
    • Replace LOG_FILTER_GENERAL with "misc" (with quotations)
    • Replace LOG_FILTER_PLAYER_LOADING with "entities.player" (with quotations)
    • Replace LOG_FILTER_CHARACTER with "entities.player.character" (with quotations)
    • Replace LOG_FILTER_PLAYER_DUMP with "entities.player.dump" (with quotations)
    • Replace LOG_FILTER_PLAYER_ITEMS with "entities.player.items" (with quotations)
    • Replace LOG_FILTER_LOOT with "loot" (with quotations)
    • Replace LOG_FILTER_SERVER_LOADING with "server.loading" (with quotations)


    (There's more filter types, but I only linked the ones that people get errors on all the time..)

    Example of using the log directive (without extra args):

    Code:
    TC_LOG_ERROR("misc", "Error!");
    Example of using the log directive (with extra args):

    Code:
    uint32 number = 15;
    TC_LOG_INFO("misc", "The number is %u", number);
    Pretty simple, huh? Pretty much the conclusion. Can't see if I even left anything out, seeing all you're using is the define directives, anyway, enjoy this small explanation! Need any help just ask.
    Last edited by Tommy; 01-06-2014 at 07:23 PM.
    Achievements:
    Got a Sticky! Referrer 1 year registered Member Level XL Level C Conversationalist
    Awards:
    Member of Staff Support Smartass LOL Scripter Repacker Most Posts Facepalm! Average Top Discussion Ender Drunk

  2. The Following 4 Users Say Thank You to Tommy For This Useful Post:


  3. #2
    Epic Member <span style='color: #9400D3'><span class='glow_000000'>Epicblood</span></span>'s Avatar
    Join Date
    May 2013
    Location
    California
    Posts
    380
    XP
    5,459
    Level
    21
    Thanks
    145
    Thanked 52 Times in 32 Posts
    This could be usefull xD
    thanks :D

  4. #3
    Original Poster
    Founder <span style='color: #FF4500'>Tommy</span>'s Avatar
    Join Date
    Apr 2013
    Posts
    7,391
    XP
    3,449,104
    Level
    378
    Thanks
    889
    Thanked 1,855 Times in 1,119 Posts
    Quote Originally Posted by Epicblood View Post
    This could be usefull xD
    thanks :D
    You're welcome and FU point whore.

  5. The Following User Says Thank You to Tommy For This Useful Post:


  6. #4
    Epic Member <span style='color: #9400D3'><span class='glow_000000'>Epicblood</span></span>'s Avatar
    Join Date
    May 2013
    Location
    California
    Posts
    380
    XP
    5,459
    Level
    21
    Thanks
    145
    Thanked 52 Times in 32 Posts
    Quote Originally Posted by Tommy View Post
    You're welcome and FU point whore.
    What's a point whore?

  7. #5
    Respected Member <span style='color: #000000'><span class='glow_FFFFFF'>Selik</span></span>'s Avatar
    Join Date
    Apr 2013
    Location
    Tommy's mom.
    Posts
    141
    XP
    4,070
    Level
    18
    Thanks
    26
    Thanked 13 Times in 13 Posts
    Quote Originally Posted by Tommy View Post
    You're welcome and FU point whore.
    You're the biggest point whore, sir. Anyways good job on this :D.
    Awards:
    LOL Facepalm! Raffle Winner
    [Nom Entertainment] Click click.

  8. #6
    Original Poster
    Founder <span style='color: #FF4500'>Tommy</span>'s Avatar
    Join Date
    Apr 2013
    Posts
    7,391
    XP
    3,449,104
    Level
    378
    Thanks
    889
    Thanked 1,855 Times in 1,119 Posts
    Updated!

  9. #7
    Esteemed Member faiver's Avatar
    Join Date
    Jul 2013
    Location
    colombia
    Posts
    257
    XP
    56,843
    Level
    73
    Thanks
    40
    Thanked 39 Times in 24 Posts
    remplace
    LOG_FILTER_TSCR ???

    I have not idea.
    could help

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •