Comments (2)
You'll need to wrap all of the code in an object and modify the function definitions to use it locally. Note the commas after each function. In the same way I've done it with the CBL library. If you make a start I'll be happy to look it over:
var BetterLog = (function() {
return {
// Public Functions
.
.
.
info: function() {
},
} // return
// Private Functions
.
.
.
})() // BetterLog
from betterlog.
I just pasted it in the same file i have been using for my project. And i pasted it first.
I then just did: var Logger = useSpreadsheet('my doc');
then i can freely use Logger.log("log me");
and it logs to my Log sheet.
from betterlog.
Related Issues (20)
- Setting DATE_TIME_LAYOUT isn't working HOT 1
- Use of BetterLog directly on script project fails HOT 1
- I'm not sure why, but I get this error - HOT 7
- stringify(object) dynamically?... HOT 2
- Stringify undefined arguments HOT 1
- Server errors if multiple users quickly writing to log as it tries to refresh HOT 4
- 50000 rollover HOT 3
- Error for lock.releaseLock
- Using remote logger HOT 8
- Cannot handle returning cyclic object. HOT 3
- to stackdriver without spreadsheet? HOT 2
- When BetterLog is activated onOpen function fails HOT 5
- Is it possible to specify a folder to save archived logs? HOT 3
- Giving permissions to spreadsheet file not working HOT 4
- My string is not using %s, but the error "Not enough arguments" appears HOT 2
- Logging Html String not working HOT 3
- Library project key isn't working
- BetterLog duplicates output for each message to console two times HOT 2
- onEdit() trigger couldn't be used: Exception: You do not have permission to call SpreadsheetApp.openById. Required permissions: https://www.googleapis.com/auth/spreadsheets HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from betterlog.