The keyword static in C and C++ has (within others) the meaning of being file local. Hence, it is not a good idea to put such a declaration in a header file. That would just create multiple independent objects, one for each file into which you include the header.
Instead, you should define the stream in your main.cpp (or any other of your cpp files) and pass a pointer or reference around to the other files.
As Eugen already pointed out, you could put an extern declaration in the header file to accomplish that.
[EDIT: Example]
extern std::ofstream myfile_logs;
std::ofstream myfile_logs ("D:\\Elec...");
should just work fine.