Introducing smblog-mode for emacs

Ralph Boehme rb at sernet.de
Tue Mar 15 13:28:25 UTC 2016


On Tue, Mar 15, 2016 at 12:05:13PM +0100, Aurélien Aptel wrote:
> On Mon, 14 Mar 2016 14:46:33 +0100 Ralph Boehme <rb at sernet.de> wrote:
> > This contains the returned status code.
> 
> I have assumed the result directly following a request is the result of
> that request (in other words, you cannot have request made in between).
>  
> > It would be awesome if emacs could display this collapsed as
> > 
> > SMB2 request: SMB2_OP_CREATE, response: NT_STATUS_OK
> > SMB2 request: ...           , response: ...
> > 
> > Then when selecting a line and pressing TAB it would expand and show
> > all log lines for that request.
> 
> I have implemented something slightly different. By looking a log at
> level 10 you can press `r` to get a list of all requests detected in a
> new window.
> 
> - This window is automatically selected, you can close it
>   with `q`.
> - By pressing RET it will cycle between the start and end of the
>   current line request in the log window.
> - By navigating with `n` and `p` it will jump to the start of the
>   request in the log window.
> 
> The focus is kept on this request window for all commands, again, press
> `q` to close it and go back to the log window.
> 
> Tell me what you think.

love it, this is awesome! :)

- green NT_STATUS_OK and red errors is perfect

- jumping between start and beginning of a request is simple and
  really helpful

Some nitpicks:

- SMB2 opcode should be black, leading text can be grey

- allow to split the window vertically (maybe with uppercase r)

- the request lines contain somewhat redundant and unneeded info that
  disctracts the eye:

  "SMB request SMB2_OP_CLOSE            , status NT_STATUS_OK"

  Maybe something like this would be better:

  "SMB2 request CLOSE            ... response NT_STATUS_OK"

  The text "SMB2 request" could be grey, but "CLOSE", the SMB2 opcode
  should be black.

Thanks again!
-Ralph

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de



More information about the samba-technical mailing list