- add better logging for meeting create and doc conversion
This commit is contained in:
parent
b1c22ad8fd
commit
9b299a9f91
@ -188,8 +188,7 @@ public class MeetingService implements MessageListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleCreateMeeting(Meeting m) {
|
private void handleCreateMeeting(Meeting m) {
|
||||||
log.debug("Storing Meeting with internal id:" + m.getInternalId());
|
log.info("Storing Meeting with internalId=[" + m.getInternalId() + "], externalId=[" + m.getExternalId() + "], name=[" + m.getName() + "], duration=[" + m.getDuration() + "], record=[" + m.isRecord() + "]");
|
||||||
log.debug(" ******************* Storing Meeting with internal id:" + m.getInternalId());
|
|
||||||
meetings.put(m.getInternalId(), m);
|
meetings.put(m.getInternalId(), m);
|
||||||
if (m.isRecord()) {
|
if (m.isRecord()) {
|
||||||
Map<String,String> metadata = new LinkedHashMap<String,String>();
|
Map<String,String> metadata = new LinkedHashMap<String,String>();
|
||||||
@ -443,7 +442,7 @@ public class MeetingService implements MessageListener {
|
|||||||
User user = m.getUserById(message.userId);
|
User user = m.getUserById(message.userId);
|
||||||
if(user != null){
|
if(user != null){
|
||||||
user.setStatus(message.status, message.value);
|
user.setStatus(message.status, message.value);
|
||||||
log.debug("Setting new status value in meeting " + message.meetingId + " for participant:"+user.getFullname());
|
log.debug("Setting new status value in meeting " + message.meetingId + " for participant:" + user.getFullname());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
log.warn("The participant " + message.userId + " doesn't exist in the meeting " + message.meetingId);
|
log.warn("The participant " + message.userId + " doesn't exist in the meeting " + message.meetingId);
|
||||||
|
9
bigbluebutton-web/src/java/org/bigbluebutton/presentation/DocumentConversionServiceImp.java
Executable file → Normal file
9
bigbluebutton-web/src/java/org/bigbluebutton/presentation/DocumentConversionServiceImp.java
Executable file → Normal file
@ -23,8 +23,12 @@ import org.bigbluebutton.api.messaging.MessagingService;
|
|||||||
import org.bigbluebutton.presentation.imp.ImageToSwfSlidesGenerationService;
|
import org.bigbluebutton.presentation.imp.ImageToSwfSlidesGenerationService;
|
||||||
import org.bigbluebutton.presentation.imp.OfficeToPdfConversionService;
|
import org.bigbluebutton.presentation.imp.OfficeToPdfConversionService;
|
||||||
import org.bigbluebutton.presentation.imp.PdfToSwfSlidesGenerationService;
|
import org.bigbluebutton.presentation.imp.PdfToSwfSlidesGenerationService;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class DocumentConversionServiceImp implements DocumentConversionService {
|
public class DocumentConversionServiceImp implements DocumentConversionService {
|
||||||
|
private static Logger log = LoggerFactory.getLogger(DocumentConversionServiceImp.class);
|
||||||
|
|
||||||
private MessagingService messagingService;
|
private MessagingService messagingService;
|
||||||
private OfficeToPdfConversionService officeToPdfConversionService;
|
private OfficeToPdfConversionService officeToPdfConversionService;
|
||||||
private PdfToSwfSlidesGenerationService pdfToSwfSlidesGenerationService;
|
private PdfToSwfSlidesGenerationService pdfToSwfSlidesGenerationService;
|
||||||
@ -32,6 +36,8 @@ public class DocumentConversionServiceImp implements DocumentConversionService {
|
|||||||
|
|
||||||
public void processDocument(UploadedPresentation pres) {
|
public void processDocument(UploadedPresentation pres) {
|
||||||
SupportedDocumentFilter sdf = new SupportedDocumentFilter(messagingService);
|
SupportedDocumentFilter sdf = new SupportedDocumentFilter(messagingService);
|
||||||
|
log.info("Start presentation conversion. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "], timestamp=[" + System.currentTimeMillis() + "]");
|
||||||
|
|
||||||
if (sdf.isSupported(pres)) {
|
if (sdf.isSupported(pres)) {
|
||||||
String fileType = pres.getFileType();
|
String fileType = pres.getFileType();
|
||||||
|
|
||||||
@ -54,6 +60,9 @@ public class DocumentConversionServiceImp implements DocumentConversionService {
|
|||||||
} else {
|
} else {
|
||||||
// TODO: error log
|
// TODO: error log
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.info("End presentation conversion. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "], timestamp=[" + System.currentTimeMillis() + "]");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMessagingService(MessagingService m) {
|
public void setMessagingService(MessagingService m) {
|
||||||
|
@ -63,7 +63,7 @@ public class PdfToSwfSlidesGenerationService {
|
|||||||
public void generateSlides(UploadedPresentation pres) {
|
public void generateSlides(UploadedPresentation pres) {
|
||||||
log.debug("Generating slides");
|
log.debug("Generating slides");
|
||||||
determineNumberOfPages(pres);
|
determineNumberOfPages(pres);
|
||||||
log.debug("Determined number of pages " + pres.getNumberOfPages());
|
log.info("Determined number of pages. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "], numPages=[" + pres.getNumberOfPages() + "]");
|
||||||
if (pres.getNumberOfPages() > 0) {
|
if (pres.getNumberOfPages() > 0) {
|
||||||
convertPdfToSwf(pres);
|
convertPdfToSwf(pres);
|
||||||
// createPngImages(pres);
|
// createPngImages(pres);
|
||||||
@ -97,21 +97,23 @@ public class PdfToSwfSlidesGenerationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void createThumbnails(UploadedPresentation pres) {
|
private void createThumbnails(UploadedPresentation pres) {
|
||||||
log.debug("Creating thumbnails.");
|
log.info("Creating thumbnails. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "]");
|
||||||
notifier.sendCreatingThumbnailsUpdateMessage(pres);
|
notifier.sendCreatingThumbnailsUpdateMessage(pres);
|
||||||
thumbnailCreator.createThumbnails(pres);
|
thumbnailCreator.createThumbnails(pres);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createTextFiles(UploadedPresentation pres) {
|
private void createTextFiles(UploadedPresentation pres) {
|
||||||
log.debug("Creating textfiles for accessibility.");
|
log.info("Creating textfiles for accessibility. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "]");
|
||||||
notifier.sendCreatingTextFilesUpdateMessage(pres);
|
notifier.sendCreatingTextFilesUpdateMessage(pres);
|
||||||
textFileCreator.createTextFiles(pres);
|
textFileCreator.createTextFiles(pres);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createPngImages(UploadedPresentation pres) {
|
private void createPngImages(UploadedPresentation pres) {
|
||||||
log.debug("Creating PNG images.");
|
log.info("Creating PNG images. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "]");
|
||||||
notifier.sendCreatingPngImagesUpdateMessage(pres);
|
notifier.sendCreatingPngImagesUpdateMessage(pres);
|
||||||
pngImageCreator.createPngImages(pres);
|
pngImageCreator.createPngImages(pres);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void convertPdfToSwf(UploadedPresentation pres) {
|
private void convertPdfToSwf(UploadedPresentation pres) {
|
||||||
int numPages = pres.getNumberOfPages();
|
int numPages = pres.getNumberOfPages();
|
||||||
List<PdfToSwfSlide> slides = setupSlides(pres, numPages);
|
List<PdfToSwfSlide> slides = setupSlides(pres, numPages);
|
||||||
@ -149,7 +151,7 @@ public class PdfToSwfSlidesGenerationService {
|
|||||||
slidesCompleted++;
|
slidesCompleted++;
|
||||||
notifier.sendConversionUpdateMessage(slidesCompleted, pres);
|
notifier.sendConversionUpdateMessage(slidesCompleted, pres);
|
||||||
} else {
|
} else {
|
||||||
log.info("Timedout waiting for page to finish conversion.");
|
log.warn("Timedout waiting for page to finish conversion. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "]");
|
||||||
}
|
}
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
log.error("InterruptedException while creating slide " + pres.getName());
|
log.error("InterruptedException while creating slide " + pres.getName());
|
||||||
@ -160,7 +162,8 @@ public class PdfToSwfSlidesGenerationService {
|
|||||||
|
|
||||||
for (final PdfToSwfSlide slide : slides) {
|
for (final PdfToSwfSlide slide : slides) {
|
||||||
if (! slide.isDone()){
|
if (! slide.isDone()){
|
||||||
log.warn("Creating blank slide for " + slide.getPageNumber());
|
log.warn("Creating blank slide. MeetingId=[" + pres.getMeetingId() + "], presId=[" + pres.getId() + "], name=[" + pres.getName() + "], page=[" + slide.getPageNumber() + "]");
|
||||||
|
|
||||||
slide.generateBlankSlide();
|
slide.generateBlankSlide();
|
||||||
notifier.sendConversionUpdateMessage(slidesCompleted++, pres);
|
notifier.sendConversionUpdateMessage(slidesCompleted++, pres);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user