MCPcopy Index your code
hub / github.com/ajatkj/scriptable / writeLOG

Function writeLOG

LSWeather.js:1223–1232  ·  view source on GitHub ↗
(logMsg)

Source from the content-addressed store, hash-verified

1221FUNCTION writeLOG
1222------------------------------------------------------------------*/
1223async function writeLOG(logMsg){
1224 if (!config.runsInApp && LOG_TO_FILE) {
1225 const fm = FileManager.iCloud();
1226 let logPath = fm.joinPath(fm.documentsDirectory(), LOG_FILE_PATH);
1227 if (!fm.fileExists(logPath)) fm.createDirectory(logPath);
1228 const logFile = fm.joinPath(logPath, 'Step_' + LOG_STEP + '_' + LOG_FILE_NAME);
1229 fm.writeString(logFile, logMsg);
1230 } else console.log ("Step_" + LOG_STEP + ": " + logMsg);
1231 LOG_STEP++;
1232}
1233/*------------------------------------------------------------------
1234FUNCTION convertFromUTC
1235------------------------------------------------------------------*/

Callers 9

LSWeather.jsFile · 0.70
encodeOverlayImageFunction · 0.70
fetchWeatherFunction · 0.70
getWeatherIconFunction · 0.70
createOverlayFunction · 0.70
prefixImageFunction · 0.70
updateLayoutFunction · 0.70
fetchQuotesFunction · 0.70
checkUpdatesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected