Text/Event logging

Text Logs can be used to log events or text from your javascript or website.

Error logging

Error Logs should be used to log errors that you catch in javascript. This will make you surround your javascript with try catches, as most of javascript developers forget that. Once you catch the error in a catch block, you can call the error log method with e.name (name of the error), e.message (error message) and e.stack (the call stack of your javascript) You can also pass in the data object which will be converted into a JSON string. This will help you debug your errors away from your javascript.

Custom logging

Sometimes we want more than just text and error logging, we want a table like structure which we can put logs in and later analyze. The table has been generated for you based on the column names you just provided and now you can log directly into that table of yours. Its more organized logging.

Client Information

All types of logs comes with client information such as
  • Country
  • Domain
  • Url
  • Ip Address
  • Browser
  • Browser Version
  • Operating System
  • Time Stamp
This shall provide you with some extra information that you may need to tackle an issue or to analyze the growth of your javascripts.

Size Limits

There are certain size limits that you should be aware of while using log4sure.js
Log Type Name Size Description
Text Logs Log Message 512 characters Value will be truncated if longer than 512 characters
Error Logs Name 512 characters Value will be truncated if longer than 512 characters
Error Logs Log Message 512 characters Value will be truncated if longer than 512 characters
Error Logs Error Stack 1024 characters Value will be truncated if longer than 1024 characters
Error Logs Data 1024 characters Value will be truncated if longer than 1024 characters
Custom Logs All log values 512 characters Value will be truncated if longer than 512 characters

Manage

There is a manage section on My libraries page that will allow you to manage your library.
Here are the things you can do

Add Authorized Ip

This allows you to add only specific ip address that can log to log4sure. Once you have added authorized ip, no one else except that ip will be allowed to log.

Add Blacklisted Ip

If you have an ip that you no longer wish to see log data then you can add it to blacklisted ip address. Everyone else will be able to log it except the the blacklisted ip address.

Allow Everyone

This setting allows everyone to log, you can still exclude ip address by adding it into blacklisted ip.

Activate/Inactivate

You can activate or inactivate your library for logging through this. In an inactive state the server won't log any logs from anyone.

Archive All Logs

You can archive all your logs for a library at any given time. It will still be accessible to you in archive section. A library has a limit of 50000 logs, once the library hits that limit, all the logs will be archived for you and will be available via archive section. This action cannot be undone

Delete All Logs

This action will delete all unarchived logs for your library. This action cannot be undone.