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

tessel logs #88

Open
Frijol opened this issue May 4, 2015 · 7 comments
Open

tessel logs #88

Frijol opened this issue May 4, 2015 · 7 comments

Comments

@Frijol
Copy link
Member

Frijol commented May 4, 2015

Current status: no such command

Spec: T2 CLI spec
tessel logs [-n ] [-t | --tail] [stdout | stderr]

Lists the recent activity and console.logs (100 lines default) from the running program

$ tessel logs --help
> Usage: tessel logs [-n <lines>] [-t | --tail] [--help]
>  -n:          the number of lines of log to display
>  -m|--monitor:    continuously display the logs as they are updated
>  stdout|stderr:   display the logs from the specified output stream
$ 

$ tessel logs -n 2
> Bulbasaur is running index.js
> #[03/31/2015 18:10:28] This is my logggggg
> #[03/31/2015 18:10:29] Look at it!
$ 

$ tessel logs --tail
> Bulbasaur is running index.js
> #[03/31/2015 18:10:28] This is my logggggg
> #[03/31/2015 18:10:29] Look at it!
> #[03/31/2015 18:11:29] Look at it!
> #[03/31/2015 18:12:29] Look at it!
> #[03/31/2015 18:13:29] Look at it!
> #[03/31/2015 18:14:29] Look at it!
> #[03/31/2015 18:15:29] Look at it!
> #[03/31/2015 18:16:29] Look at it!
> #[03/31/2015 18:17:29] Look at it!
> #[03/31/2015 18:18:29] Look at it!
$ 

$ tessel logs -t stderr
> Bulbasaur is running index.js
> #[03/31/2015 18:10:28] Error: index.js:146 - index out of bounds yo
$ 
@Frijol Frijol added the spec-cli label May 4, 2015
@Frijol Frijol mentioned this issue May 4, 2015
15 tasks
@nplus11
Copy link
Contributor

nplus11 commented May 4, 2015

The -o in the usage message is old. Needs to be removed and changed to [stdout|stderr]

@Frijol
Copy link
Member Author

Frijol commented May 4, 2015

Removed.

@johnnyman727
Copy link
Contributor

@sidwarkd are you still working on this task?

@johnnyman727
Copy link
Contributor

I've removed @sidwarkd as the assignee because we haven't heard from him lately. I think this is a non-trivial feature to add: you'll have to somehow overwrite console.log to write to a file whose lifespan is the same as the Node process, then add a command to the CLI to read the contents of that file.

@Frijol Frijol removed the spec-cli label Sep 2, 2016
@dbuentello
Copy link
Contributor

dbuentello commented Sep 4, 2016

Id like to propose additional functionality.

Functionality: Log the boot process
Example interface: t2 logs --boot

The current method to log the boot process is cumbersome. This is due to fact that it happens really early and really fast:

  1. know the /dev/serial/whatever location of your tessel
  2. enter the command line for screen -L
  3. connect the tessel via usb
  4. hit enter as fast as you can

I wrote a tool that provided some relief* but implementing this in the CLI would be awesome. It can also help when providing support.

*I still had to switch between terminals 😅

@dbuentello
Copy link
Contributor

@johnnyman727 I'll look into overwriting console.log, any ideas on capping the size?

@Frijol
Copy link
Member Author

Frijol commented Sep 6, 2016

@dbuentello that idea seems reasonable to me – sounds like this is something you've needed in the past?

I don't think we need to worry overmuch about the size of the logs

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

No branches or pull requests

5 participants