Skip to content

Commit

Permalink
chore: Standarizing logs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexGue committed Dec 22, 2020
1 parent f1b65ea commit 2ba0c14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ router.get('/', function (req, res) {
async function getFileFromString(URL) {
var file;
if (URL.startsWith('https://') || URL.startsWith('http://')) {
console.log("Getting external file: " + URL)
logger.info("Getting external file: " + URL)
await axios({
url: URL,
method: 'GET',
Expand All @@ -65,7 +65,7 @@ async function getFileFromString(URL) {
} else {
//Check first file exist to return null
if (fs.existsSync('./src/frontend' + URL)) {
console.log("Getting file locally: " + URL)
logger.info("Getting file locally: " + URL)
file = await fs.readFileSync('./src/frontend' + URL, 'utf8');
}
else {
Expand Down

0 comments on commit 2ba0c14

Please sign in to comment.