Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yazumoto/google-apps-script-file-logger
File Logging Library for Google Apps Script
https://github.com/yazumoto/google-apps-script-file-logger
Last synced: 8 days ago
JSON representation
File Logging Library for Google Apps Script
- Host: GitHub
- URL: https://github.com/yazumoto/google-apps-script-file-logger
- Owner: yazumoto
- Created: 2018-01-19T16:29:42.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-19T16:44:19.000Z (almost 7 years ago)
- Last Synced: 2024-11-07T10:50:40.150Z (about 2 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Google Apps Sciprt File Logger
===File logging library for Google Apps Script.
You can create Log Document File in your script file folder and logging to the file.## Install
In your Google Apps Script.
Menu > Resource > Library...
Enter `ScriptId` below.
```
1bWIXL3PmJQdgAjvUxY_qxStfTIdIMe7qwIqHq78XXzL3zyyVuhVvhI1S
```Now you can use `FileLogger` class in your script.
## Usage
In your function, you can just write your code like this.
```
function myFunction() {
FileLogger.logging(function(){
// your code here.
Logger.log('test log');
});
}
```=> This will create a Document File name 'script.log' and write text below.
```
Sat Jan 20 01:21:07 JST 2018 INFO: test log
````FileLogger.logging` has a callback parameter.
`FileLogger` create `script.log` Document File in a folder script file in if it doesn't exist.
Every `Logger.log` in this callback are written to this log file after your code run.