Download
(32 Kb)
Download
Updated: 04/17/23 04:52 PM
Pictures
File Info
Compatibility:
Necrom (9.0.0)
Scribes of Fate (8.3.5)
Updated:04/17/23 04:52 PM
Created:05/31/19 03:28 PM
Monthly downloads:369
Total downloads:18,588
Favorites:49
MD5:
Categories:Utility Mods, Data Mods
DebugLogViewer  Popular! (More than 5000 hits)
Version: 1.2.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.2.0
- updated for Necrom

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 (2)
File Name
Version
Size
Uploader
Date
1.1.0
32kB
sirinsidiator
04/10/20 11:30 AM
1.0.0
32kB
sirinsidiator
06/01/19 08:46 AM


Post A Reply Comment Options
Unread 10/13/23, 03:56 AM  
wambo
AddOn Author - Click to view AddOns

Forum posts: 38
File comments: 458
Uploads: 3
I wanted to ask a similar question, would it be possible to make the DebugLogViewer work like the chat output does? Showing Items and Icons and Colors in text?

My workaround atm is to integrate LibChatMessage into the addons, but it's tedious and needs to be redone when the addon gets updated... (I really need to get into making patches with git)


First make sure that LibChatMessage is installed:
https://www.esoui.com/downloads/info...atMessage.html

Then add it as Dependency to the Addon manifest, for this is the .txt in the Addons folder, there might be other addons listed already, just add the Library seperated by a space
Code:
## DependsOn:  LibChatMessage
For example in InventoryManager (IM) I added lines like this:


Lua Code:
  1. if not InventoryManager then InventoryManager = {} end
  2. local IM = InventoryManager  -- This is from the addon
  3. IM.chat = LibChatMessage("Inventory Manager", "IM")  --This is loading the Library, its enough to add it to the main lua file of the addon
  4. local chat = IM.chat -- This needs to be added to every .lua file that has functions that print to chat

After that we can replace calls like
Lua Code:
  1. CHAT_SYSTEM:AddMessage("  Item " .. i .. ": " .. "some text or variable")

With

Lua Code:
  1. chat:Print("  Item " .. i .. ": " .. " some text or variable ")

Some even older addons might just use the debug function to print to chat, I'm not sure whether you can just replace them with chat:Print but maybe.
Also you can also use "IM.chat:Print" instead of chat:Print and there won't be the need to add local chat = IM.chat
Last edited by wambo : 10/13/23 at 04:01 AM.
Report comment to moderator  
Reply With Quote
Unread 09/24/23, 10:35 PM  
Ziryan

Forum posts: 0
File comments: 1
Uploads: 0
This is exactly what i was looking for. It is great and I would love it, if there wasn't this one little thing...

Instead of Eso UI's icons, long lines of text are displayed in nearly every entry of the actions of my mods on different points. Sometimes at the end, sometimes in the middle. This makes the logs long and confusing. Three lines look like:

"Sell: ||t16:16:/esoui/art/icons/crafting_dwemer_shiny_gear.dds||t Dwemergear
Dustman sold 3x Ectoplasm in the value of 27||t16:16:EsoUI/Art/currency/currency_gold.dds||t.
BMR has 5.511 ||t80%:80%:/esoui/art/currency/gold_mipmap.dds||t relocated to the bank."

I use multiple mods to organise my inventory, bank, etc. automatically based on my settings and i want a clear overview over every action these mods do. :/

Is there a solution? Either way, thanks for your efforts.
Report comment to moderator  
Reply With Quote
Unread 03/30/22, 08:13 AM  
Askedal

Forum posts: 9
File comments: 101
Uploads: 0
Filter for Quicklogger

Hi,

is there a way to filter the Quicklogger just for my Addon only without added all the others to the exclusion list, Like the filter in the main window? Some sort of Whitelist (show only these) instead of a Blacklist (do not show these).

Many thanks for this great addon

Askedal
Report comment to moderator  
Reply With Quote
Unread 03/16/20, 02:02 AM  
charlie_rowland

Forum posts: 0
File comments: 15
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: 1579
File comments: 1132
Uploads: 41
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.
Report comment to moderator  
Reply With Quote
Unread 03/11/20, 10:35 PM  
charlie_rowland

Forum posts: 0
File comments: 15
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: 1579
File comments: 1132
Uploads: 41
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.
Report comment to moderator  
Reply With Quote
Unread 03/10/20, 10:59 PM  
charlie_rowland

Forum posts: 0
File comments: 15
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: 1579
File comments: 1132
Uploads: 41
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.
Report comment to moderator  
Reply With Quote
Unread 03/07/20, 05:44 PM  
charlie_rowland

Forum posts: 0
File comments: 15
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: 1579
File comments: 1132
Uploads: 41
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.
Report comment to moderator  
Reply With Quote
Unread 03/03/20, 06:36 AM  
wambo
AddOn Author - Click to view AddOns

Forum posts: 38
File comments: 458
Uploads: 3
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: 38
File comments: 458
Uploads: 3
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: 1579
File comments: 1132
Uploads: 41
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.
Report comment to moderator  
Reply With Quote
Unread 02/27/20, 04:22 PM  
wambo
AddOn Author - Click to view AddOns

Forum posts: 38
File comments: 458
Uploads: 3
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
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.