Invoke a method in the main sketch from within a library
The connection between a sketch and a library is not one-way as many suppose.  Things can go quite happily in both directions.

What you are proposing is something I do quite often when developing a library and I need to get some debugging information out of the library. Yes, it's possible to directly use Serial in the library, but that's something I don't like, and often isn't appropriate anyway, as in your situation.

However, doing it the way you propose (and I use) is actually very simple.

You just make your function in your sketch and tell the library to use it.

For example, in your sketch:

void debug(const char *msg) {
    Serial3.println(msg);
}


And in the library add the line:

void debug(const char *msg);


Then at any point in the same file (or translation unit) you can use 

debug("I am here");


That is assuming that the file that you are using it in is a C++ file (.cpp).  If it's a C file (.c) then you have to treat things very slightly differently.  You see, C++ makes a mess of the function names (even vanilla functions like that) which means they can't be seen by C files.  So you have to tell the compiler "I'd like this to be usable in a C file, please".

Which you do with a special "extern" wrapper around your function:

extern "C" {
    void debug(const char *msg) {
        Serial3.println(msg);
    }
}


And then debug() is usable in a C file in the same way as above.  

However now it won't work in a C++ file...  (round and round we go...)

Simple to fix: add the extern "C" to the prototype in the C++ file:

extern "C" {
    void debug(const char *msg);
}


If you want to include your "extern" in a header file that could be included into either C or C++ files it's very common to use a construct such as:

#if defined(__cplusplus)
extern "C" {
#endif

void debug(const char *msg);

#if defined(__cplusplus)
}
#endif


That will add the extern "C" wrapper for C++ files (identified by the presence of the macro __cplusplus) but omit it for C files.

I have used "const char *" as the parameter for this example, but you can choose whatever parameters are appropriate for your usage.