
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
github.com/TapiocaTechnologies/tapioca_logging
tapioca_logging is a simple GO module to help with logging to a file. It uses build in go packages (fmt, log, os) to help you add logging to your projects quickly.
tapioca_logging can be added directly to your go projects via import:
import (
"github.com/TapiocaTechnologies/tapioca_logging"
)
Make sure you are using the most current version v0.1.4 you can change the version you are using in your go.mod file.
SetLogFile(path string): Allows you to set where you would like to save your log file, along with what you would like it named. This function allows relative and absolute paths
tapioca_logging.SetLogFile("testlogfile.log")
tapioca_logging.SetLogFile("c:\dev\testlogfile.log")
Logging(message string): This is a general function that allows you to write a string to a file. Inserts log message with [GENERAL] tag before message.
message := "Welcome to tapioca_logging"
tapioca_logging.Logging(message)
LoggingError(err error): This is a general function that allows you to write an error to a file. Inserts log message with [ERROR] tag before message.
errs := errors.New("Error")
tapioca_logging.LoggingError(errs)
LoggingNetwork(message string): Use this function if you need to log anything that has to do with networking. Inserts log message with [NETWORK] tag before message.
message := "Client successfully connected"
tapioca_logging.LoggingNetwork(message)
LoggingNetwork(err error): Use this function if you need to log anything that has to do with networking errors. Inserts log message with [NETWORK] [ERROR] tag before message.
errs := errors.New("Client failed to connect")
tapioca_logging.LoggingNetworkError(errs)
2021/01/26 19:01:46 [GENERAL] Welcome to tapioca_logging
2021/01/26 19:01:46 [ERROR] Error
2021/01/26 19:01:46 [NETWORK] Client successfully connected
2021/01/26 19:01:46 [NETWORK] [Error] Client failed to connect
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.