
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
extendscript_logfile
Advanced tools
A basic logging file Class for Adobe ExtendScript with UMD wrapper for cross-compatability with AMD and node.js require.
An Adobe ExtendScript compatible log file constructor with some built in convenience functions in a UMD wrapper for cross-compatability with AMD and node.js require.
Tries to be flexible but automate most things.
If running Node NPM, you can npm install ExtendScript_Log to add to your node_modules folder
Clone or download the repo and copy the extendscript_logfile.jsxinc to your project
var LogFile = require("ExtendScript_LogFile");
I don't know but it's probably not difficult? Firmly in the untested-but-should-work category
$.evalFile("<path>/extendscript_logfile.jsxinc")
//@include "<path>/extendscript_logfile.jsxinc"
Add to a build script or, I dunno, just copy-pasta it in there?
make a new log file and you get a separate instance
var myLogFile = new ExtendScript_LogFile();
myLogFile.log('Hey there.');
"new" constructor takes 4 optional arguments.
new ExtendScript_LogFile (root, logType, logDir, useDate)
is an alternate root object to tack on a 'logFile' alias By passing $.global as first arg, we get global log and console objects!
root = $.global;// root to add convenience aliases to
var myExplicitLogFileVariable = new ExtendScript_LogFile(root);
myExplicitLogFileVariable.log('So explicit!');// call from a var
logFile.log('Like magic.');// uses the $.global.logFile we made
specifies a non-"default" type and makes a file name
var myLogFile = new ExtendScript_LogFile();
myLogFile.log('Hey there.');
var specialLogFile = new ExtendScript_LogFile(null,"special");
specialLogFile.log('Salutations.');
// prints to:
// ./logs/default_2021-05-28T16-15-37.611.log >>[2021-05-28T16:15:37.612] default : Hey there.
// ./logs/special_2021-05-28T16-15-37.656.log >>[2021-05-28T16:15:37.657] special : Salutations.
a non-"default" directory path to save the log to
root = $.global;// root to add convenience aliases to
logType = "special";// name other than "default"
logDir = '~/Desktop/mylogcabin/';// custom log directory
var myLogFile = new ExtendScript_LogFile(root, logType, logDir);
myLogFile.log('Salutations.');
// prints to:
// ~/Desktop/mylogcabin/special_2021-05-28T16-15-37.656.log >>[2021-05-28T16:15:37.657] special : Salutations.
specifies if the date should be prepended to the log entries
can be changed with .useDate(false)
root = $.global;// root to add convenience aliases to
logType = "special";// name other than "default"
logDir = '~/Desktop/mylogcabin/';// custom log directory
useDate = false;
var myLogFile = new ExtendScript_LogFile(root, logType, logDir, useDate);
myLogFile.log('Salutations.');
// prints to:
// ~/Desktop/mylogcabin/special_2021-05-28T16-15-37.656.log >> special : Salutations.
.log() and .writeln() do the same thing...
.useDate(false) will disable the date printing in each entry
myLogFile = new ExtendScript_Log($.global);
logFile.log('Messages are good.');
var namespace = {};// maybe some other log system?
myLogSafeFile = new ExtendScript_Log(namespace);
namespace.logFile.log('This is way safer.');
You can .clear() the contents or .remove() the file from disk.
You can also clear out of the same type with .removeOld() for non-current or .removeAll() for all.
myLogFile = new ExtendScript_Log();
logfile.log('Messages are good.');
myLogSafeFile = new ExtendScript_Log(namespace,'special');
namespace.logFile.log('This is way safer.');
myLogSafeFile.remove();
// make a bunch of "default" logs...
myLogFile = new ExtendScript_Log();
myLogFile = new ExtendScript_Log();
myLogFile = new ExtendScript_Log();
myLogFile = new ExtendScript_Log();
// purge all but latest "default" log.
myLogFile.removeOld();
// now only the current "default" file is left
myLogFile.removeAll();
myLogSafeFile = new ExtendScript_Log(namespace);
Tries to make a log file in ./logs in the location of the currently running script, but will fall back to ~/Desktop/ExtendScript_Log_UnsavedScripts/
This is used as a optional extra in ExtendScript_Log
Like peanutbutter and chocolate...
FAQs
A basic logging file Class for Adobe ExtendScript with UMD wrapper for cross-compatability with AMD and node.js require.
We found that extendscript_logfile demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.