
Product
Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
@architect/logs
Advanced tools
@architect/logs
@architect/logs is a module that retrieves and clears logs associated to your @architect functions across environments.
npm i @architect/logs
let logs = require('@architect/logs')
logs({pathToCode, verbose, destroy, production}, callback)
Takes a parameter object as first argument which accepts the following properties:
pathToCode
: required the local path to architect Function code relative
to the current working directory, i.e. src/http/get-index
verbose
: verbose super chatty modedestroy
: if truthy will delete logs via logs.destroy
, otherwise will
read logs via logs.read
production
: if truthy will target your arc project's production environment,
otherwise will default to stagingBy default will read logs from the staging environment. If the destroy
property is truthy, logs instead will be destroyed.
logs.read({name, pathToCode, ts}, callback)
Will read logs from aws.CloudWatchLogs
, invoking
getLogEvents
for log retrieval.
Takes a parameter object as first argument which accepts the following properties:
name
: the CloudFormation StackName
passed to
listStackResources
within which to search Function logs. Note
that this is inferred from your application name, environment and specific
function you are querying - tread carefully!pathToCode
: required the local path to architect Function code relative
to the current working directory, i.e. src/http/get-index
ts
: timestamp to use as a start time for displaying length of time details
(i.e. Date.now()
)callback
will be invoked with an error if an error arises during execution.
Otherwise, callback
will be invoked without arguments.
logs.destroy({name, pathToCode, ts}, callback)
Will delete logs from aws.CloudWatchLogs
, invoking
deleteLogGroup
.
Takes a parameter object as first argument which accepts the following properties:
name
: the CloudFormation StackName
passed to
listStackResources
within which to search Function logs. Note
that this is inferred from your application name, environment and specific
function you are querying - tread carefully!pathToCode
: required the local path to architect Function code relative
to the current working directory, i.e. src/http/get-index
ts
: timestamp to use as a start time for displaying length of time details
(i.e. Date.now()
)callback
will be invoked with an error if an error arises during execution.
Otherwise, callback
will be invoked without arguments.
FAQs
Manage logging from Architect-provisioned cloud functions
We found that @architect/logs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers 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.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.