How can we log data from ESP8266-12E with out serial monitor.

After uploading the program to ESP8266-12e nodemcu development board, we have given supply to the board using external battery then how can we collect data from it.

What data

By using HTTP Post/Get statements in your sketch to deposit the data on a database via a web server.

Presently i am using relay and nodemcu to switch on and off of a light using web button as well as wall switch. I want continuous data regarding state of a light and which button is pressed(web button/wall switch).