Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: first implement #1

Merged
merged 1 commit into from Jan 20, 2017
Merged

feat: first implement #1

merged 1 commit into from Jan 20, 2017

Conversation

popomore
Copy link
Member

@popomore popomore commented Jan 20, 2017

Closes eggjs/egg#280

Copy link
Member

@atian25 atian25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

'use strict';

module.exports = {
instrument(event, action) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jsdoc

const ms = require('ms');

class Instrument {
constructor(ctx) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

要 extend BaseContextClass 么?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不用吧

@fengmk2 fengmk2 merged commit 5aeb382 into master Jan 20, 2017
@fengmk2 fengmk2 deleted the first branch January 20, 2017 09:51
@fengmk2
Copy link
Member

fengmk2 commented Jan 20, 2017

@popomore 突然间想到不能只能 local 开启,instrument 方法应该一直存在才对,只是 prod 会将 instrument 设置为空函数

@popomore
Copy link
Member Author

那我改下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants