MZaragoza
MZaragoza

Reputation: 10111

How can I get the username of the loged in user on heroku console?

I am writing a tool that will info me who is logging in to the Heroku console.

I am already getting a message when the console is open, I just can't tell who opened it.

#config/initializers/console_spy.rb
ConsoleSpy.new.send_notification("DevName", "Console was opened")

so I get a notification when the console is open but I don't know who

reference source https://getaround.tech/rails-console-spy/

Upvotes: 1

Views: 174

Answers (1)

Aymen Bou
Aymen Bou

Reputation: 1109

I don't think this is possible yet via the heroku console.

You can however, track and monitor the heroku logs to find out who, when and at what time accessed the heroku console.

2019-04-12T15:48:05.727693+00:00 app[api]: Starting process with command `rails console` by user [email protected]

Upvotes: 3

Related Questions