Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.6 KB

File metadata and controls

46 lines (30 loc) · 1.6 KB

Process the log

What you need to do

  • If you haven’t already, take a git class in codeschool.
  • Once complete, create a private repo called “yipl-log-processor” in bitbucket
  • Solve the problem detailed below
  • Push your code to the repo (make sure that you have multiple commits with proper messages)
  • Invite internship-bitbucket@yipl.com.np to that particular private repo
  • Submit your application

Problem

You have a log file. You need to write code that reads the given log file, processes its content and provides a summary of the logs, as shown in the 'output' section below. The code should be written in any one of the following programming languages: node, python, php, golang.

The filename should be: process.php, process.py, process.js or process.go depending upon the language you choose.

Your code should run from the cli as shown below. If you don’t know how to use cli in one of the given languages, now is the time to learn it.

In php, php process.php

In python, python process.py

In node, node process.js

In go, go run process.go

Running the above command should give the following output:

2016-12-12 warning:2 error: 1
2016-12-13 warning:0 error: 1
2016-12-14 warning:1 error: 1

Bonus points

  • If you can write and include unit tests for your code.
  • If you write readme files with the instructions necessary to run the code

Note: If you are creating a separate class file, your class filename should be "logprocessor.php", "logprocessor.py" and so on for other languages.