Skip to content

Commit efbce64

Browse files
committed
log that the env was loaded, not that we're about to load
1 parent ef6e1bd commit efbce64

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,19 @@ function streambot(service) {
3434
Key: { name: { S: context.functionName } }
3535
};
3636

37-
console.log('Load Environment: %s', JSON.stringify(getParams));
3837
dynamodb.getItem(getParams, function(err, data) {
3938
if (err) {
4039
console.log('[error] Failed to load environment: %s', err.message);
4140
return context.fail(err);
4241
}
4342

4443
if (!data.Item) {
45-
console.log('No Environment found!');
44+
console.log('No environment found!');
4645
return service.call(context, event, callback);
4746
}
4847

48+
console.log('Loaded environment: %s', JSON.stringify(getParams));
49+
4950
var env = JSON.parse(data.Item.env.S);
5051
Object.keys(env).forEach(function(key) {
5152
process.env[key] = env[key];

0 commit comments

Comments
 (0)