Quantcast
Download
(32 Kb)
Download
Updated: 04/10/20 11:30 AM
Pictures
File Info
Compatibility:
Harrowstorm (5.3.5)
Updated:04/10/20 11:30 AM
Created:05/31/19 03:28 PM
Monthly downloads:176
Total downloads:2,953
Favorites:21
MD5:
Categories:Utility Mods, Data Mods
DebugLogViewer
Version: 1.1.0
by: sirinsidiator [More]
This add-on is a front-end for LibDebugLogger and allows to view and filter the logged messages.
There is now an external Log Viewer too, which can be used to share log files.

Features:
  • Quick Log for non-intrusive display of log messages
  • No more Lua error pop-ups - they will now show in the quick log and play a sound instead
  • No more add-on debug messages in chat - they will be shown in the quick log
  • Log Viewer with filters
  • Detail view for message
  • Add-on Settings (including LibDebugLogger settings)

The log viewer can be bound to a key, opened via the /logviewer slash command, or via the options context menu in the quick log.
Clicking the time stamp or tag on an entry in the quick log, or the a row in the log viewer will open a new window with the full message and stack trace.
Any links in a message can be interacted with normally, both from the log viewer and the quick log.

Dependencies:
Make sure to install the following required libraries in order to use DebugLogViewer.
Reporting a problem:
Before you report something, please make sure you have installed the latest version of all your addons and check the Change Log for known issues.

Please take the time to cover the following points in your report:
1) What were you trying to do?
2) What actually happened?
3) Which steps did you take?
4) Can you reproduce it a second time after logging out and in again (or /reloadui)?

Screenshots and videos are also very useful to figure out what is going wrong. In addition you should also log out (or /reloadui) and upload the LibDebugLogger.lua from your Saved Variables somewhere and include a link to it. It contains a lot of useful information that will make it even easier for me to pinpoint an issue and get it fixed fast.
v1.1.0
- added support for verbose log level
- changed how log messages are sanitized (markup is now printed in plain text instead of rendered)
- fixed an error caused by log messages without a valid tag
- added support for verbose log level
- added some public APIs (see StartUp.lua)
Archived Files (1)
File Name
Version
Size
Uploader
Date
1.0.0
32kB
sirinsidiator
06/01/19 08:46 AM


Post A Reply Comment Options
Unread 03/16/20, 02:02 AM  
charlie_rowland

Forum posts: 0
File comments: 7
Uploads: 0
no problem. I just removed all the EVENT_MANAGER functions from LibDebugLogger and any references or functions related to LogDeprecationWarning in LibStub and that takes care of it. Thanks for your help!
Report comment to moderator  
Reply With Quote
Unread 03/12/20, 02:37 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1441
File comments: 963
Uploads: 37
Originally Posted by charlie_rowland
It would be nice if you answered my questions and not just patronize me. I have spent years optimizing algorithms to optimize them and from your log file it does not look like your code is very optimized. In addition since it takes what seems to be forever to load the game I am very much concerned with anything that is adding to that.
In that case I suggest you use ESOProfiler to check which addons are actually increasing your load time and then act on that data instead of making baseless accusations.
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 03/11/20, 10:35 PM  
charlie_rowland

Forum posts: 0
File comments: 7
Uploads: 0
It would be nice if you answered my questions and not just patronize me. I have spent years optimizing algorithms to optimize them and from your log file it does not look like your code is very optimized. In addition since it takes what seems to be forever to load the game I am very much concerned with anything that is adding to that.
Report comment to moderator  
Reply With Quote
Unread 03/11/20, 01:00 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1441
File comments: 963
Uploads: 37
Originally Posted by charlie_rowland
I am more concerned with the time it takes to log these, not for me to see them. I am not flying a plane, just trying to load my game up faster. Frankly why do I care that an addon is using LibStub? Why are there so many? Can't you make it more efficient? It also does not tell me which addon is causing the error so it is basically useless anyway.
You shouldn't be concerned about that. It is already as efficient as can be and just because the viewer shows the message several times in a row doesn't mean that it is stored more than once.
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 03/10/20, 10:59 PM  
charlie_rowland

Forum posts: 0
File comments: 7
Uploads: 0
I am more concerned with the time it takes to log these, not for me to see them. I am not flying a plane, just trying to load my game up faster. Frankly why do I care that an addon is using LibStub? Why are there so many? Can't you make it more efficient? It also does not tell me which addon is causing the error so it is basically useless anyway.
Last edited by charlie_rowland : 03/10/20 at 11:01 PM.
Report comment to moderator  
Reply With Quote
Unread 03/08/20, 05:17 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1441
File comments: 963
Uploads: 37
Re: W/LibStub Don't Call Me

Originally Posted by charlie_rowland
I have about 100 of these lines in the logviewer.

I do not care to log any of this info. I tried disabling LibDebugLogger but it is required by AwesomeGuildStore.

Can you remove the dependency for AwesomeGuildStore, please?

Thank you!
The answer to that is no. LibDebugLogger is like the flight recorder in a plane. You wouldn't ask Boeing to remove that, would you?
What you can do however is to hide the messages you do not want to see. Simply go to the DebugLogViewer settings and add "LibStub" to the tag filter for the QuickLog.
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 03/07/20, 05:44 PM  
charlie_rowland

Forum posts: 0
File comments: 7
Uploads: 0
W/LibStub Don't Call Me

I have about 100 of these lines in the logviewer.

I do not care to log any of this info. I tried disabling LibDebugLogger but it is required by AwesomeGuildStore.

Can you remove the dependency for AwesomeGuildStore, please?

Thank you!
Report comment to moderator  
Reply With Quote
Unread 03/03/20, 07:32 AM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1441
File comments: 963
Uploads: 37
Originally Posted by wambo
So, I know looked into two addons, and 1st did neither use d() or df() and 2nd only in included Libraries
but instead they used:

CHAT_SYSTEM:AddMessage("[Addon Name] " .. text)

I would assume that is nothing that debuglogger should catch? Technically I could just replace the CHAT_SYSTEM:AddMessage with the chat:Print("[Addon Name] " .. text)
CHAT_SYSTEM:AddMessage was the method used underneath d() and df() before this update. It has since been moved to the addon compatibility layer and shouldn't be used any more.
You got the replacement almost right. you just need to remove the "[Addon Name] ", since that will be added by LibChatMessage and would show up twice in the message as a result.
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 03/03/20, 06:36 AM  
wambo
AddOn Author - Click to view AddOns

Forum posts: 35
File comments: 387
Uploads: 1
So, I know looked into two addons, and 1st did neither use d() or df() and 2nd only in included Libraries
but instead they used:

CHAT_SYSTEM:AddMessage("[Addon Name] " .. text)

I would assume that is nothing that debuglogger should catch? Technically I could just replace the CHAT_SYSTEM:AddMessage with the chat:Print("[Addon Name] " .. text)
Report comment to moderator  
Reply With Quote
Unread 02/28/20, 04:03 AM  
wambo
AddOn Author - Click to view AddOns

Forum posts: 35
File comments: 387
Uploads: 1
Wow, that was way more detailed than I was expecting. But it definitely sounds doable.

Thanks a lot!
Last edited by wambo : 03/03/20 at 06:36 AM.
Report comment to moderator  
Reply With Quote
Unread 02/27/20, 05:15 PM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1441
File comments: 963
Uploads: 37
Originally Posted by wambo
This might be the wrong place to ask, but how complicated is it to do this exchagne?

I have pretty limited programming experience, but I imagine it is about
- adding the LibChatMessage to the dependencies
- Loading the LibChatMessage (maybe?)
- and exchanging the function calls to d() with the one from LibChatMessages?

I could probably try to do that for a few addons, I always wanted to contribute a bit but felt unable to :-/
It highly depends on how the addon is written. Some just have one central place where they print their chat messages, others have the calls littered all over the place. Some prepend the message with a [Tag], others may even have some settings that affect how it works.

- adding LibChatMessage as a dependency is as simple as adding a new line
Code:
## DependsOn: LibChatMessage>=87
in the txt file of the addon (or just append it to the end if there is already a line with "DependsOn"). The >= 87 is optional, but tells the game to require at least a version of LibChatMessage with an "AddOnVersion" equal or higher to that number.

- Loading is not something the author has to worry about any more. The user has to ensure all required dependencies are present.

- Exchanging d() and df() is the tricky part. First you need to create a chat proxy for the addon:
Lua Code:
  1. local chat = LibChatMessage("MyAddOn", "MAO") -- first string is the long tag, second the short tag
Where to place that depends on the addon structure. If it only has one file you can just put it somewhere on the top. If the addon is split up into multiple files, it will have a global table with a name similar to the addon name somewhere in the lua file that is listed first in the txt. You can just assign it to that table so you have access in all other files. e.g.
Lua Code:
  1. MyAddOn = {}
  2. MyAddOn.chat = LibChatMessage("MyAddOn", "MAO")
and then you can assign it to a local variable in each file where it is needed:
Lua Code:
  1. local chat = MyAddOn.chat

Then you have to locate all places where d and df are used with the help of notepad++' find in files feature (ctrl+shift+f) or a similar tool. The regular expression
Code:
\sdf?\(
and filtering for *.lua files should find everything in most cases. you may also need to check *.xml files in case they contain lua code.
The calls to d() have to be replaced with chat:Print() and calls to df() with chat:Printf().

After that you just need to test that everything is still working and you are done.
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 02/27/20, 04:22 PM  
wambo
AddOn Author - Click to view AddOns

Forum posts: 35
File comments: 387
Uploads: 1
This might be the wrong place to ask, but how complicated is it to do this exchagne?

I have pretty limited programming experience, but I imagine it is about
- adding the LibChatMessage to the dependencies
- Loading the LibChatMessage (maybe?)
- and exchanging the function calls to d() with the one from LibChatMessages?

I could probably try to do that for a few addons, I always wanted to contribute a bit but felt unable to :-/
Report comment to moderator  
Reply With Quote
Unread 02/26/20, 01:19 PM  
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1441
File comments: 963
Uploads: 37
Originally Posted by wambo
Is there any way to not "snatch" informational chat messages from addons (like loot log or the likes) from the chat ?

I can deactivate the Info Log Level, but it still doesnt appear in chat anymore?
There is no way to do that aside from not using the DebugLogViewer as a user, or addon authors updating their addons to not abuse the d() debug method to print messages in chat.
The issue is that d() is a debug tool and as such DebugLogViewer will capture its output, but most addons simply abuse it to display chat messages to the user, because it happens to print the debug output in chat in the base game (although it bypasses several systems). If you have a specific addon that doesn't print to chat, you should kindly ask the author to make use of LibChatMessage to print those chat messages the proper way.
__________________
https://www.imperialtradingcompany.eu/ - My Addons - The Vault (Early updates and experimental projects) - My patreon - My blog
>siri.exe MyAddon
Does your addon work? [y/n] n
There is a typo in there.
Report comment to moderator  
Reply With Quote
Unread 02/26/20, 11:27 AM  
wambo
AddOn Author - Click to view AddOns

Forum posts: 35
File comments: 387
Uploads: 1
Is there any way to not "snatch" informational chat messages from addons (like loot log or the likes) from the chat ?

I can deactivate the Info Log Level, but it still doesnt appear in chat anymore?
Report comment to moderator  
Reply With Quote
Unread 06/21/19, 07:50 AM  
ChrisK

Forum posts: 0
File comments: 76
Uploads: 0
Re: Re: Awesome!

Whoa! Thanks for the amazingly fast reply!

Worked perfectly after /reloadui

Awesome!
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.